<?php
/**
 * Mageplaza
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Mageplaza.com license that is
 * available through the world-wide-web at this URL:
 * https://www.mageplaza.com/LICENSE.txt
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    Mageplaza
 * @package     Mageplaza_Faqs
 * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/)
 * @license     https://www.mageplaza.com/LICENSE.txt
 */

namespace Mageplaza\Faqs\Controller\Adminhtml\Tag;

use Magento\Backend\App\Action\Context;
use Magento\Framework\Controller\ResultInterface;
use Magento\Framework\Registry;
use Magento\Framework\View\Result\LayoutFactory;
use Mageplaza\Faqs\Controller\Adminhtml\Tag;
use Mageplaza\Faqs\Model\TagFactory;

/**
 * Class Articles
 * @package Mageplaza\Faqs\Controller\Adminhtml\Tag
 */
class Articles extends Tag
{
    /**
     * @var LayoutFactory
     */
    protected $resultLayoutFactory;

    /**
     * Articles constructor.
     *
     * @param LayoutFactory $resultLayoutFactory
     * @param TagFactory $tagFactory
     * @param Registry $coreRegistry
     * @param Context $context
     */
    public function __construct(
        LayoutFactory $resultLayoutFactory,
        TagFactory $tagFactory,
        Registry $coreRegistry,
        Context $context
    ) {
        $this->resultLayoutFactory = $resultLayoutFactory;

        parent::__construct($tagFactory, $coreRegistry, $context);
    }

    /**
     * Save action
     *
     * @return ResultInterface
     */
    public function execute()
    {
        $this->initTag(true);

        return $this->resultLayoutFactory->create();
    }
}
