本文整理匯總了PHP中Magento\Framework\View\Element\Template\Context::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Context::__construct方法的具體用法?PHP Context::__construct怎麽用?PHP Context::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Framework\View\Element\Template\Context
的用法示例。
在下文中一共展示了Context::__construct方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* @param \Magento\Framework\App\RequestInterface $request
* @param \Magento\Framework\View\LayoutInterface $layout
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param \Magento\Framework\UrlInterface $urlBuilder
* @param \Magento\Framework\App\CacheInterface $cache
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Session\SessionManagerInterface $session
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\View\Asset\Repository $assetRepo
* @param \Magento\Framework\View\ConfigInterface $viewConfig
* @param \Magento\Framework\App\Cache\StateInterface $cacheState
* @param \Psr\Log\LoggerInterface $logger
* @param \Magento\Framework\Escaper $escaper
* @param \Magento\Framework\Filter\FilterManager $filterManager
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Framework\View\FileSystem $viewFileSystem
* @param \Magento\Framework\View\TemplateEnginePool $enginePool
* @param \Magento\Framework\App\State $appState
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\View\Page\Config $pageConfig
* @param \Magento\Framework\View\Element\Template\File\Resolver $resolver
* @param \Magento\Framework\View\Element\Template\File\Validator $validator
* @param \Ced\DevTool\Helper\Data $devToolHelper
* @param \Magento\Framework\Registry $registry
* @param \Ced\DevTool\Model\Config $config
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(\Magento\Framework\App\RequestInterface $request, \Magento\Framework\View\LayoutInterface $layout, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\App\CacheInterface $cache, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Session\SessionManagerInterface $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\ConfigInterface $viewConfig, \Magento\Framework\App\Cache\StateInterface $cacheState, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Escaper $escaper, \Magento\Framework\Filter\FilterManager $filterManager, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\View\FileSystem $viewFileSystem, \Magento\Framework\View\TemplateEnginePool $enginePool, \Magento\Framework\App\State $appState, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\View\Page\Config $pageConfig, \Magento\Framework\View\Element\Template\File\Resolver $resolver, \Magento\Framework\View\Element\Template\File\Validator $validator, \Ced\DevTool\Helper\Data $devToolHelper, \Magento\Framework\Registry $registry, \Ced\DevTool\Model\Config $config)
{
$this->_devToolHelper = $devToolHelper;
$this->registry = $registry;
$this->_config = $config;
parent::__construct($request, $layout, $eventManager, $urlBuilder, $cache, $design, $session, $sidResolver, $scopeConfig, $assetRepo, $viewConfig, $cacheState, $logger, $escaper, $filterManager, $localeDate, $inlineTranslation, $filesystem, $viewFileSystem, $enginePool, $appState, $storeManager, $pageConfig, $resolver, $validator);
}
示例2: __construct
/**
* @param \Magento\Framework\App\RequestInterface $request
* @param \Magento\Framework\View\LayoutInterface $layout
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param \Magento\Framework\UrlInterface $urlBuilder
* @param \Magento\Framework\App\CacheInterface $cache
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Session\Generic $session
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\View\Asset\Repository $assetRepo
* @param \Magento\Framework\View\ConfigInterface $viewConfig
* @param \Magento\Framework\App\Cache\StateInterface $cacheState
* @param \Psr\Log\LoggerInterface $logger
* @param \Magento\Framework\Escaper $escaper
* @param \Magento\Framework\Filter\FilterManager $filterManager
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Framework\View\FileSystem $viewFileSystem
* @param \Magento\Framework\View\TemplateEnginePool $enginePool
* @param \Magento\Framework\App\State $appState
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\View\Page\Config $pageConfig
* @param \Magento\Framework\AuthorizationInterface $authorization
* @param \Magento\Backend\Model\Session $backendSession
* @param \Magento\Framework\Math\Random $mathRandom
* @param \Magento\Framework\Data\Form\FormKey $formKey
* @param \Magento\Framework\Code\NameBuilder $nameBuilder
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(\Magento\Framework\App\RequestInterface $request, \Magento\Framework\View\LayoutInterface $layout, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\App\CacheInterface $cache, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Session\Generic $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\ConfigInterface $viewConfig, \Magento\Framework\App\Cache\StateInterface $cacheState, \Psr\Log\LoggerInterface $logger, \Magento\Framework\Escaper $escaper, \Magento\Framework\Filter\FilterManager $filterManager, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\View\FileSystem $viewFileSystem, \Magento\Framework\View\TemplateEnginePool $enginePool, \Magento\Framework\App\State $appState, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\View\Page\Config $pageConfig, \Magento\Framework\AuthorizationInterface $authorization, \Magento\Backend\Model\Session $backendSession, \Magento\Framework\Math\Random $mathRandom, \Magento\Framework\Data\Form\FormKey $formKey, \Magento\Framework\Code\NameBuilder $nameBuilder)
{
$this->_authorization = $authorization;
$this->_backendSession = $backendSession;
$this->mathRandom = $mathRandom;
$this->formKey = $formKey;
$this->nameBuilder = $nameBuilder;
parent::__construct($request, $layout, $eventManager, $urlBuilder, $cache, $design, $session, $sidResolver, $scopeConfig, $assetRepo, $viewConfig, $cacheState, $logger, $escaper, $filterManager, $localeDate, $inlineTranslation, $filesystem, $viewFileSystem, $enginePool, $appState, $storeManager, $pageConfig);
}
示例3: __construct
/**
* @param \Magento\Framework\App\RequestInterface $request
* @param \Magento\Framework\View\LayoutInterface $layout
* @param \Magento\Framework\Event\ManagerInterface $eventManager
* @param \Magento\Framework\UrlInterface $urlBuilder
* @param \Magento\Framework\TranslateInterface $translator
* @param \Magento\Framework\App\CacheInterface $cache
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Session\SessionManagerInterface $session
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\View\Asset\Repository $assetRepo
* @param \Magento\Framework\View\ConfigInterface $viewConfig
* @param \Magento\Framework\App\Cache\StateInterface $cacheState
* @param \Magento\Framework\Logger $logger
* @param \Magento\Framework\Escaper $escaper
* @param \Magento\Framework\Filter\FilterManager $filterManager
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
* @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
* @param \Magento\Framework\App\Filesystem $filesystem
* @param \Magento\Framework\View\FileSystem $viewFileSystem
* @param \Magento\Framework\View\TemplateEnginePool $enginePool
* @param \Magento\Framework\App\State $appState
* @param \Magento\Framework\StoreManagerInterface $storeManager
* @param \Magento\Catalog\Model\Config $catalogConfig
* @param \Magento\Framework\Registry $registry
* @param \Magento\Tax\Helper\Data $taxHelper
* @param \Magento\Catalog\Helper\Data $catalogHelper
* @param \Magento\Framework\Math\Random $mathRandom
* @param \Magento\Checkout\Helper\Cart $cartHelper
* @param \Magento\Wishlist\Helper\Data $wishlistHelper
* @param \Magento\Catalog\Helper\Product\Compare $compareProduct
* @param \Magento\Catalog\Helper\Image $imageHelper
* @param ReviewRendererInterface $reviewRenderer
* @param \Magento\CatalogInventory\Service\V1\StockItemService $stockItemService
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(\Magento\Framework\App\RequestInterface $request, \Magento\Framework\View\LayoutInterface $layout, \Magento\Framework\Event\ManagerInterface $eventManager, \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\TranslateInterface $translator, \Magento\Framework\App\CacheInterface $cache, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Session\SessionManagerInterface $session, \Magento\Framework\Session\SidResolverInterface $sidResolver, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\View\ConfigInterface $viewConfig, \Magento\Framework\App\Cache\StateInterface $cacheState, \Magento\Framework\Logger $logger, \Magento\Framework\Escaper $escaper, \Magento\Framework\Filter\FilterManager $filterManager, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation, \Magento\Framework\App\Filesystem $filesystem, \Magento\Framework\View\FileSystem $viewFileSystem, \Magento\Framework\View\TemplateEnginePool $enginePool, \Magento\Framework\App\State $appState, \Magento\Framework\StoreManagerInterface $storeManager, \Magento\Catalog\Model\Config $catalogConfig, \Magento\Framework\Registry $registry, \Magento\Tax\Helper\Data $taxHelper, \Magento\Catalog\Helper\Data $catalogHelper, \Magento\Framework\Math\Random $mathRandom, \Magento\Checkout\Helper\Cart $cartHelper, \Magento\Wishlist\Helper\Data $wishlistHelper, \Magento\Catalog\Helper\Product\Compare $compareProduct, \Magento\Catalog\Helper\Image $imageHelper, ReviewRendererInterface $reviewRenderer, \Magento\CatalogInventory\Service\V1\StockItemService $stockItemService)
{
$this->imageHelper = $imageHelper;
$this->compareProduct = $compareProduct;
$this->wishlistHelper = $wishlistHelper;
$this->cartHelper = $cartHelper;
$this->catalogConfig = $catalogConfig;
$this->registry = $registry;
$this->taxData = $taxHelper;
$this->catalogHelper = $catalogHelper;
$this->mathRandom = $mathRandom;
$this->reviewRenderer = $reviewRenderer;
$this->stockItemService = $stockItemService;
parent::__construct($request, $layout, $eventManager, $urlBuilder, $translator, $cache, $design, $session, $sidResolver, $scopeConfig, $assetRepo, $viewConfig, $cacheState, $logger, $escaper, $filterManager, $localeDate, $inlineTranslation, $filesystem, $viewFileSystem, $enginePool, $appState, $storeManager);
}