本文整理汇总了PHP中Sonata\AdminBundle\Admin\Admin::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin::__construct方法的具体用法?PHP Admin::__construct怎么用?PHP Admin::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sonata\AdminBundle\Admin\Admin
的用法示例。
在下文中一共展示了Admin::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($code, $class, $baseControllerName)
{
parent::__construct($code, $class, $baseControllerName);
if (!$this->hasRequest()) {
$this->datagridValues = array('_page' => 1, '_per_page' => 25, '_sort_order' => 'ASC', '_sort_by' => 'position');
}
}
示例2: __construct
public function __construct($code, $class, $baseControllerName)
{
parent::__construct($code, $class, $baseControllerName);
if (!$this->hasRequest()) {
$this->datagridValues = array('_page' => 1, '_per_page' => 25);
}
}
示例3: __construct
public function __construct($code, $class, $baseControllerName, PageManagerInterface $pageManagerInterface, OptionalSiteInterface $optionalSiteInterface)
{
$this->pageManagerInterface = $pageManagerInterface;
$this->optionalSiteInterface = $optionalSiteInterface;
$this->positionHandler = new PositionHandler();
parent::__construct($code, $class, $baseControllerName);
}
示例4: __construct
public function __construct($code, $class, $baseControllerName)
{
parent::__construct($code, $class, $baseControllerName);
$entity = new $class();
$accessor = PropertyAccess::createPropertyAccessor();
$entityReflection = new \ReflectionClass($class);
foreach ($entityReflection->getProperties() as $property) {
$propertyName = $property->getName();
if ($accessor->isWritable($entity, $propertyName) && $accessor->isReadable($entity, $propertyName)) {
$this->fields[] = ['name' => $propertyName];
}
}
}
示例5: __construct
/**
* @param string $code
* @param string $class
* @param string $baseControllerName
* @param Pool $pool
* @param CategoryManagerInterface $categoryManager
*/
public function __construct($code, $class, $baseControllerName, Pool $pool, CategoryManagerInterface $categoryManager)
{
parent::__construct($code, $class, $baseControllerName);
$this->pool = $pool;
$this->categoryManager = $categoryManager;
}
示例6: __construct
public function __construct($code, $class, $baseControllerName, ContainerInterface $container)
{
$this->container = $container;
parent::__construct($code, $class, $baseControllerName);
}
示例7: __construct
public function __construct($code, $class, $baseControllerName, $container = null)
{
parent::__construct($code, $class, $baseControllerName);
$this->container = $container;
}
示例8: __construct
public function __construct($code, $class, $baseControllerName)
{
$this->setYamlParser(new Parser());
parent::__construct($code, $class, $baseControllerName);
}
示例9: __construct
/**
* Constructor
*
* @param string $code A Sonata admin code
* @param string $class A Sonata admin class name
* @param string $baseControllerName A Sonata admin base controller name
* @param RoutePageGenerator $routePageGenerator Sonata route page generator service
*/
public function __construct($code, $class, $baseControllerName, RoutePageGenerator $routePageGenerator)
{
$this->routePageGenerator = $routePageGenerator;
parent::__construct($code, $class, $baseControllerName);
}
示例10: __construct
/**
* SchoolYearAdmin constructor.
* @param string $code
* @param string $class
* @param string $baseControllerName
* @param \Doctrine\ORM\EntityManagerInterface $entityManager
* @param string $absoluteUploadPath
*/
public function __construct($code, $class, $baseControllerName, \Doctrine\ORM\EntityManagerInterface $entityManager, $absoluteUploadPath)
{
$this->entityManager = $entityManager;
$this->absoluteUploadPath = $absoluteUploadPath;
parent::__construct($code, $class, $baseControllerName);
}
示例11: __construct
/**
* @param string $code
* @param string $class
* @param string $baseControllerName
* @param ContextManager $contextManager
*/
public function __construct($code, $class, $baseControllerName, ContextManager $contextManager)
{
parent::__construct($code, $class, $baseControllerName);
$this->contextManager = $contextManager;
}
示例12: __construct
public function __construct($code, $class, $baseControllerName, DateNow $date_now_service)
{
$this->date_now_service = $date_now_service;
parent::__construct($code, $class, $baseControllerName);
}
示例13: __construct
/**
* @param string $code
* @param string $class
* @param string $baseControllerName
*/
public function __construct($code, $class, $baseControllerName)
{
$this->getRequestParameters($this->getRequest());
return parent::__construct($code, $class, $baseControllerName);
}
示例14: __construct
public function __construct($code, $class, $baseControllerName, EntityManager $entityManager)
{
parent::__construct($code, $class, $baseControllerName);
$this->entityManager = $entityManager;
}
示例15: __construct
public function __construct($code, $class, $baseControllerName)
{
parent::__construct($code, $class, $baseControllerName);
// TODO: Change the autogenerated stub
$this->setTranslationDomain('BrotherContactUsBundle');
}