本文整理汇总了PHP中Sonata\BlockBundle\Block\BaseBlockService::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseBlockService::__construct方法的具体用法?PHP BaseBlockService::__construct怎么用?PHP BaseBlockService::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sonata\BlockBundle\Block\BaseBlockService
的用法示例。
在下文中一共展示了BaseBlockService::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param string $name
* @param EngineInterface $templating
* @param ActionManagerInterface $actionManager
* @param TimelineManagerInterface $timelineManager
* @param SecurityContextInterface $securityContext
*/
public function __construct($name, EngineInterface $templating, ActionManagerInterface $actionManager, TimelineManagerInterface $timelineManager, SecurityContextInterface $securityContext)
{
$this->actionManager = $actionManager;
$this->timelineManager = $timelineManager;
$this->securityContext = $securityContext;
parent::__construct($name, $templating);
}
示例2: __construct
public function __construct($name, $templating, $template = null)
{
if ($template) {
$this->template = $template;
}
parent::__construct($name, $templating);
}
示例3: __construct
/**
* @param string $name
* @param EngineInterface $templating
* @param RegistryInterface $registry
* @param CurrencyDetectorInterface $currencyDetector
* @param ProductFinderInterface $productFinder
* @param string $productClass
*/
public function __construct($name, EngineInterface $templating, RegistryInterface $registry, CurrencyDetectorInterface $currencyDetector, ProductFinderInterface $productFinder, $productClass)
{
$this->productRepository = $registry->getManager()->getRepository($productClass);
$this->currencyDetector = $currencyDetector;
$this->productFinder = $productFinder;
parent::__construct($name, $templating);
}
示例4: __construct
/**
* @param string $name
* @param EngineInterface $templating
* @param OrderManagerInterface $orderManager
* @param CustomerManagerInterface $customerManager
* @param SecurityContextInterface $securityContext
*/
public function __construct($name, EngineInterface $templating, OrderManagerInterface $orderManager, CustomerManagerInterface $customerManager, SecurityContextInterface $securityContext)
{
$this->orderManager = $orderManager;
$this->customerManager = $customerManager;
$this->securityContext = $securityContext;
parent::__construct($name, $templating);
}
示例5: __construct
public function __construct($name, EngineInterface $templating, EntityManager $em, ManagerInterface $mediaManager, ContainerInterface $container)
{
$this->em = $em;
$this->container = $container;
$this->mediaManager = $mediaManager;
parent::__construct($name, $templating);
}
示例6: __construct
public function __construct($name, EngineInterface $templating, EntityManager $entityManager, Session $session, $sessionKey)
{
parent::__construct($name, $templating);
$this->entityManager = $entityManager;
$this->session = $session;
$this->sessionKey = $sessionKey;
}
示例7: __construct
public function __construct($name, EngineInterface $templating, Pool $pool, EntityManager $em, SecurityContext $securityContext)
{
parent::__construct($name, $templating);
$this->pool = $pool;
$this->em = $em;
$this->securityContext = $securityContext;
}
示例8: __construct
/**
* StatElevesBlockService constructor.
* @param string $name
* @param EngineInterface $templating
* @param Pool $pool
* @param EntityManager $em
* @param DateNow $dateNow
*/
public function __construct($name, EngineInterface $templating, Pool $pool, EntityManager $em, DateNow $dateNow)
{
parent::__construct($name, $templating);
$this->pool = $pool;
$this->em = $em;
$this->date_now_service = $dateNow;
}
示例9: __construct
/**
* @param string $name
* @param EngineInterface $templating
* @param string $template
*/
public function __construct($name, EngineInterface $templating, $template = null)
{
parent::__construct($name, $templating);
if ($template) {
$this->template = $template;
}
}
示例10: __construct
/**
* @param string $name
* @param EngineInterface $templating
* @param RegistryInterface $registry
* @param CurrencyDetectorInterface $currencyDetector
* @param ProductFinderInterface $productFinder
*/
public function __construct($name, EngineInterface $templating, RegistryInterface $registry, CurrencyDetectorInterface $currencyDetector, ProductFinderInterface $productFinder)
{
$this->productRepository = $registry->getManager()->getRepository('Application\\Sonata\\ProductBundle\\Entity\\Product');
$this->currencyDetector = $currencyDetector;
$this->productFinder = $productFinder;
parent::__construct($name, $templating);
}
示例11: __construct
/**
* @param string $name
* @param EngineInterface $templating
* @param BlockRendererInterface $blockRenderer
* @param string|null $template To overwrite the default template.
*/
public function __construct($name, EngineInterface $templating, BlockRendererInterface $blockRenderer, $template = null)
{
parent::__construct($name, $templating);
$this->blockRenderer = $blockRenderer;
if ($template) {
$this->template = $template;
}
}
示例12: __construct
/**
* YouTubeBlockService constructor.
* @param string $name
* @param EngineInterface $templating
* @param YouTubeApiService $youTubeApi
* @param RequestStack $requestStack
* @param GoogleRedirectService $redirectService
* @throws \Martin1982\LiveBroadcastBundle\Exception\LiveBroadcastOutputException
*/
public function __construct($name, EngineInterface $templating, YouTubeApiService $youTubeApi, RequestStack $requestStack, GoogleRedirectService $redirectService)
{
$this->youTubeApi = $youTubeApi;
$this->requestStack = $requestStack;
$redirectUri = $redirectService->getOAuthRedirectUrl();
$this->youTubeApi->initApiClients($redirectUri);
parent::__construct($name, $templating);
}
示例13: __construct
public function __construct($name, EngineInterface $templating, EntityManager $entityManager, Session $session, $formFactory, $securityContext)
{
parent::__construct($name, $templating);
$this->entityManager = $entityManager;
$this->session = $session;
$this->formFactory = $formFactory;
$this->securityContext = $securityContext;
}
示例14: __construct
/**
* @param string $name
* @param EngineInterface $templating
* @param ContainerInterface $container
*/
public function __construct($name, EngineInterface $templating, ManagerInterface $manager, ManagerInterface $collectionManager, $translator, $context)
{
parent::__construct($name, $templating);
$this->collectionManager = $collectionManager;
$this->translator = $translator;
$this->manager = $manager;
$this->context = $context;
}
示例15: __construct
/**
* @param string $name
* @param EngineInterface $templating
* @param ManagerInterface $postManager
* @param Pool $adminPool
*/
public function __construct($name, EngineInterface $templating, ManagerInterface $postManager, Pool $adminPool = null)
{
if (!$postManager instanceof PostManagerInterface) {
@trigger_error('Calling the ' . __METHOD__ . ' method with a Sonata\\CoreBundle\\Model\\ManagerInterface is deprecated since version 2.4 and will be removed in 3.0. Use the new signature with a Sonata\\NewsBundle\\Model\\PostManagerInterface instead.', E_USER_DEPRECATED);
}
$this->manager = $postManager;
$this->adminPool = $adminPool;
parent::__construct($name, $templating);
}