Commit e7afd36b by lmf

增加评论插件

parent 3e71cdec
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Block;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Block;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Block\System\Config\Form\Field;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Model\ResourceModel;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Model\ResourceModel;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Model\Source;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Model\Source;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Model\Source;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Model\Source;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Model\Source;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Model\Source;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Ui\Component\Listing\Column;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Ui\Component\Listing\Column;
use Magento\Framework\Pricing\PriceCurrencyInterface;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;
use Magento\Framework\Pricing\PriceCurrencyInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Ui\Component\Listing\Columns\Column;
class Price extends Column
{
......@@ -37,7 +43,9 @@ class Price extends Column
* Prepare Data Source
*
* @param array $dataSource
*
* @return array
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function prepareDataSource(array $dataSource)
{
......@@ -48,7 +56,7 @@ class Price extends Column
$item[$this->getData('name')] = $this->priceFormatter->format(
$item[$this->getData('name')],
false,
null,
\Magento\Framework\Pricing\PriceCurrencyInterface::DEFAULT_PRECISION,
null,
$currencyCode
);
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Ui\Component\Listing\Column;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Ui\DataProvider;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Ui\DataProvider\Form\Modifier;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Components\Ui\DataProvider\Form\Modifier;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Helper;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Helper;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Helper;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Model\Config\Source;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Model\Config\Source;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Model;
......@@ -265,7 +271,6 @@ class Feed extends \Magento\AdminNotification\Model\Feed
) {
return $this->extensionHelper->isModuleEnabled($extension);
}
}
return false;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Model\Helpers;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Model;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Model;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Observer;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Plugin\BackendMenu;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Plugin\BackendMenu;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Plugin\Notifications;
......@@ -22,7 +28,7 @@ class AitocNotificationLogoAdd
) {
$result = $proceed($row);
if ($row->getData(\Aitoc\Core\Setup\UpgradeSchema::AITOC_NOTIFICATION_FIELD)) {
if ($row->getData(\Aitoc\Core\Api\ColumnInterface::AITOC_NOTIFICATION_FIELD)) {
return '<div class="aitoc-grid-message"><div class="aitoc-notif-logo"></div>' . $result . '</div>';
} else {
return $result;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Plugin\Notifications;
......@@ -26,7 +32,7 @@ class AitocNotificationLogoAddInToolbar
{
return $subject->getLatestUnreadNotifications()
->clear()
->addFieldToFilter(\Aitoc\Core\Setup\UpgradeSchema::AITOC_NOTIFICATION_FIELD, 1);
->addFieldToFilter(\Aitoc\Core\Api\ColumnInterface::AITOC_NOTIFICATION_FIELD, 1);
}
/**
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
namespace Aitoc\Core\Plugin\Notifications;
......@@ -33,7 +39,7 @@ class GridActions
\Magento\Framework\DataObject $row
) {
$result = $proceed($row);
if ($row->getData(\Aitoc\Core\Setup\UpgradeSchema::AITOC_NOTIFICATION_FIELD)) {
if ($row->getData(\Aitoc\Core\Api\ColumnInterface::AITOC_NOTIFICATION_FIELD)) {
$result .= sprintf(
'<a class="action" href="%s" title="%s">%s</a>',
$this->getDisableUrl(),
......
<?php
namespace Aitoc\Core\Setup;
use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
class UpgradeSchema implements UpgradeSchemaInterface
{
const AITOC_NOTIFICATION_FIELD = 'aitoc_notification';
/**
* @param SchemaSetupInterface $setup
* @param ModuleContextInterface $context
*/
public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
$setup->startSetup();
if (version_compare($context->getVersion(), '1.0.1', '<')) {
$this->addAitocNotificationField($setup);
}
}
/**
* @param SchemaSetupInterface $setup
*/
private function addAitocNotificationField(SchemaSetupInterface $setup)
{
$setup->getConnection()->addColumn(
$setup->getTable('adminnotification_inbox'),
self::AITOC_NOTIFICATION_FIELD,
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['nullable' => false, 'default' => 0],
'Aitoc Notification'
);
}
}
{
"name": "aitoc/core",
"description": "Core extension by Aitoc",
"require": {
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6|~7.0.13|~7.1.0|~7.2.0|~7.3.0|~7.4.0"
},
"type": "magento2-module",
"version": "1.0.12",
"version": "1.0.16",
"license": [
"Commercial"
],
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="controller_action_predispatch">
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
<menu>
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<virtualType name="Aitoc\Core\Model\VirtualLoggerHandler" type="Magento\Framework\Logger\Handler\Base">
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Aitoc_Core" setup_version="1.0.5" />
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
/**
* Copyright © 2019 Aitoc. All rights reserved.
*/
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Core
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Api\Data;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Block\Adminhtml\Log;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Block\Adminhtml;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Block\Adminhtml;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Controller\Adminhtml;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Controller\Adminhtml\Log;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Controller\Adminhtml\Log;
......@@ -21,7 +27,6 @@ class Delete extends \Aitoc\Smtp\Controller\Adminhtml\Log
} else {
$this->messageManager->addErrorMessage(__('Unable to find the rule'));
}
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addErrorMessage($e->getMessage());
} catch (\Exception $e) {
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Controller\Adminhtml\Log;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Controller\Adminhtml\Log;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Controller\Adminhtml\Log;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Controller\Adminhtml\Log;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Controller\Adminhtml\Log;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Controller\Adminhtml\Smtp;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Controller;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Cron;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model\Config\Options;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model\Config\Options;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model\Config\Options;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model\Config\Options;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model\Framework\Mail;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model;
......@@ -194,9 +200,10 @@ class Html2Text {
return $nextName;
}
static function iterateOverNode($node, $prevName = null, $in_pre = false, $is_office_document = false, $options) {
static function iterateOverNode($node, $prevName = null, $in_pre = false, $is_office_document = false, $options = [])
{
if ($node instanceof \DOMText) {
// Replace whitespace characters with a space (equivilant to \s)
// Replace whitespace characters with a space (equivalent to \s)
if ($in_pre) {
$text = "\n" . trim(static::renderText($node->wholeText), "\n\r\t ") . "\n";
// Remove trailing whitespace only
......@@ -424,4 +431,4 @@ class Html2Text {
}
return $output;
}
}
\ No newline at end of file
}
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model\Resolver;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model\ResourceModel;
......@@ -7,13 +13,18 @@ use Magento\Framework\Model\ResourceModel\Db\VersionControl\AbstractDb;
class Log extends AbstractDb
{
/**
* Smtp Log Store Table Name
*/
const AITOC_SMTP_LOG_TABLE_NAME = 'aitoc_smtp_log';
/**
* {@inheritdoc}
*/
protected function _construct()
{
$this->_init(
\Aitoc\Smtp\Setup\InstallSchema::AITOC_SMTP_LOG_TABLE_NAME,
self::AITOC_SMTP_LOG_TABLE_NAME,
\Aitoc\Smtp\Model\Log::LOG_ID_TYPE_FIELD
);
}
}
\ No newline at end of file
}
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model\ResourceModel\Log;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model\ResourceModel\Log\Grid;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Model;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Plugin\Framework\Mail;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Plugin\Framework\Mail\Template;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Plugin\Framework\Mail\Template;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Plugin\Framework\Mail;
......@@ -48,7 +54,6 @@ class TransportInterfaceFactory
unset($data[RegistryConstants::IS_TEST_FIELD_ARRAY]);
$config = $data;
$data['message'] = $this->objectManager->create(\Magento\Framework\Mail\Message::class);
} else {
$config = $this->config->getFullConfig();
}
......
<?php
namespace Aitoc\Smtp\Setup;
use Magento\Framework\DB\Ddl\Table;
use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
class InstallSchema implements InstallSchemaInterface
{
const AITOC_SMTP_LOG_TABLE_NAME = 'aitoc_smtp_log';
/**
* @inheritDoc
*/
public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
$installer = $setup;
$installer->startSetup();
if (!$installer->tableExists(self::AITOC_SMTP_LOG_TABLE_NAME)) {
$table = $installer->getConnection()
->newTable($installer->getTable(self::AITOC_SMTP_LOG_TABLE_NAME))
->addColumn(
'log_id',
\Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
null,
['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true],
'Log Id'
)->addColumn(
'created_at',
\Magento\Framework\DB\Ddl\Table::TYPE_DATETIME,
null,
['nullable' => true, 'default' => null],
'Created At'
)
->addColumn(
'subject',
\Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
255,
['nullable' => false]
)
->addColumn(
'email_body',
\Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
null,
['nullable' => false]
)
->addColumn(
'sender_email',
\Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
120,
['nullable' => false]
)
->addColumn(
'recipient_email',
\Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
120,
['nullable' => false]
)
->addColumn(
'cc',
\Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
120,
['nullable' => true]
)
->addColumn(
'bcc',
\Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
120,
['nullable' => true]
)
->addColumn(
'status',
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
null,
['nullable' => false]
)->addColumn(
'status_message',
\Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
255,
['nullable' => true]
)->setComment('Aitoc SMTP Log');
$installer->getConnection()->createTable($table);
}
$installer->endSetup();
}
}
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Ui\Component\Listing\Column;
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
namespace Aitoc\Smtp\Ui\Component\Listing\Column;
......
{
"name": "aitoc/smtp",
"description": "SMTP",
"require": {
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6|~7.0.13|~7.1.0|~7.2.0|~7.3.0|~7.4.0",
"aitoc/core": ">=1.0.8"
},
"type": "magento2-module",
"version": "1.0.3",
"license": [
"Commercial"
],
"autoload": {
"files": [
"registration.php"
"name": "aitoc/smtp",
"description": "SMTP",
"require": {
"ext-dom": "*",
"aitoc/core": ">=1.0.16"
},
"type": "magento2-module",
"version": "1.0.4",
"license": [
"Commercial"
],
"psr-4": {
"Aitoc\\Smtp\\": ""
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Aitoc\\Smtp\\": ""
}
}
}
}
}
\ No newline at end of file
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
<menu>
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Store/etc/config.xsd">
<default>
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="default">
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
<template id="aitsmtp_resend_template" label="Aitoc SMTP Resend Template" file="resend_template.html" type="html" module="Aitoc_Smtp" area="frontend"/>
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Aitoc_Smtp" setup_version="1.0.0">
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
use Magento\Framework\Component\ComponentRegistrar;
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="styles"/>
......
<?xml version="1.0"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="empty" />
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
?>
<?php
/** @var \Aitoc\Smtp\Block\Adminhtml\TestButton $block */
?>
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
?>
<?php
/** @var \Aitoc\Smtp\Block\Adminhtml\Provider $block */
?>
<script type="text/javascript">
......
<?php
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
?>
<?php
/* @var $block \Aitoc\Smtp\Block\Adminhtml\Log\Preview */
?>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* @author Aitoc Team
* @copyright Copyright (c) 2022 Aitoc (https://www.aitoc.com)
* @package Aitoc_Smtp
*/
-->
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
......
<?php
/**
* @author Amasty Team
* @copyright Copyright (c) 2021 Amasty (https://www.amasty.com)
* @package Amasty_AdvancedReview
*/
namespace Amasty\AdvancedReview\Api;
/**
* @api
*/
interface CommentRepositoryInterface
{
/**
* Save
*
* @param \Amasty\AdvancedReview\Api\Data\CommentInterface $comment
*
* @return \Amasty\AdvancedReview\Api\Data\CommentInterface
*/
public function save(\Amasty\AdvancedReview\Api\Data\CommentInterface $comment);
/**
* Get by id
*
* @param int $id
*
* @return \Amasty\AdvancedReview\Api\Data\CommentInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getById($id);
/**
* Delete
*
* @param \Amasty\AdvancedReview\Api\Data\CommentInterface $comment
*
* @return bool true on success
* @throws \Magento\Framework\Exception\CouldNotDeleteException
*/
public function delete(\Amasty\AdvancedReview\Api\Data\CommentInterface $comment);
/**
* Delete by id
*
* @param int $id
*
* @return bool true on success
* @throws \Magento\Framework\Exception\CouldNotDeleteException
*/
public function deleteById($id);
/**
* Lists
*
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
*
* @return \Magento\Framework\Api\SearchResultsInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
/**
* @return \Amasty\AdvancedReview\Api\Data\CommentInterface
*/
public function getComment();
/**
* @param int $reviewId
*
* @return \Magento\Framework\Api\SearchResultsInterface
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getListByReviewId($reviewId);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment