Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 1f7e6648 authored by Nicolas's avatar Nicolas
Browse files

Documentation : Documentation auto pour PHP Storm

parent 3083478d
No related branches found
No related tags found
No related merge requests found
......@@ -4,12 +4,31 @@ namespace NicolasBejean\CategoryWidget\Block\Widget;
class CategoryWidget extends \Magento\Framework\View\Element\Template implements \Magento\Widget\Block\BlockInterface
{
/**
* Default value for products count that will be shown
* Category helper
*
* @var \Magento\Catalog\Helper\Category
*/
protected $_categoryHelper;
/**
* Category Flat Config
*
* @var \Magento\Catalog\Model\Indexer\Category\Flat\State
*/
protected $categoryFlatConfig;
/**
* Top Menu
*
* @var \Magento\Theme\Block\Html\Topmenu
*/
protected $topMenu;
/**
* Category factory
*
* @var \Magento\Catalog\Model\CategoryFactory
*/
protected $_categoryFactory;
protected $widgetTitle;
......@@ -18,7 +37,9 @@ class CategoryWidget extends \Magento\Framework\View\Element\Template implements
/**
* @param \Magento\Framework\View\Element\Template\Context $context
* @param \Magento\Catalog\Helper\Category $categoryHelper
* @param array $data
* @param \Magento\Catalog\Model\Indexer\Category\Flat\State $categoryFlatState
* @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
* @param \Magento\Theme\Block\Html\Topmenu $topMenu
*/
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
......@@ -29,10 +50,11 @@ class CategoryWidget extends \Magento\Framework\View\Element\Template implements
) {
$this->_categoryHelper = $categoryHelper;
$this->categoryFlatConfig = $categoryFlatState;
$this->topMenu = $topMenu;
$this->_categoryFactory = $categoryFactory;
$this->topMenu = $topMenu;
parent::__construct($context);
}
/**
* Return categories helper
*/
......
......@@ -2,7 +2,6 @@
namespace NicolasBejean\CategoryWidget\Model\Config\Source;
use Magento\Framework\Option\ArrayInterface;
use Magento\Catalog\Helper\Category;
class CategoryList implements ArrayInterface
{
......@@ -66,5 +65,4 @@ class CategoryList implements ArrayInterface
return $categoryList;
}
}
?>
\ No newline at end of file
}
\ No newline at end of file
<?php
// @codingStandardsIgnoreFile
?>
<?php
/**
* @var $this \NicolasBejean\CategoryWidget\Block\Widget\CategoryWidget
*/
$categories = $this->getCategorySelection();
$categoryHelper = $this->getCategoryHelper();
?>
......
<?php
$categories = $this->getCategorySelection();
$categoryHelper = $this->getCategoryHelper();
// @codingStandardsIgnoreFile
?>
<?php
/**
* @var $this \NicolasBejean\CategoryWidget\Block\Widget\CategoryWidget
*/
$categories = $this->getCategorySelection();
$categoryHelper = $this->getCategoryHelper();
?>
<div class="widget block block-static-block category-widget">
<div class="block-content">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment