![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/mageworx/module-seoxtemplates/Console/Command/ |
<?php /** * Copyright © MageWorx. All rights reserved. * See LICENSE.txt for license details. */ namespace MageWorx\SeoXTemplates\Console\Command; class TemplateBrandApplyCommand extends AbstractTemplateTypeManageCommand { const ENTITY_TYPE = 'brand'; /** * {@inheritdoc} */ protected function configure() { $this->setName('xtemplate:brand:apply'); $this->setDescription('Apply brand pages templates by ids'); parent::configure(); } /** * * @return boolean */ protected function isEnable() { return true; } /** * Retrieve entity template type , such as product, category, etc. */ protected function getEntityType() { return self::ENTITY_TYPE; } /** * Dispatch event * * @param array $templateIds * @return void */ protected function performAction(array $templateIds) { $this->eventManager->dispatch( 'mageworx_seoxtemplates_brand_template_apply', [ 'templateIds' => $templateIds ] ); } /** * {@inheritdoc} */ protected function getDisplayMessage() { return 'Applied brand page template ids:'; } /** * @return string */ protected function getSuccessMessage() { return 'Successful. Please, run "indexer:reindex" for refresh data.'; } }