Skip to content

Commit

Permalink
Merge 664b6d9 into 6693412
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Aug 17, 2019
2 parents 6693412 + 664b6d9 commit 6b1c8f7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
34 changes: 26 additions & 8 deletions src/Admin/AbstractAdmin.php
Expand Up @@ -385,7 +385,7 @@ abstract class AbstractAdmin implements AdminInterface, DomainObjectInterface, A
protected $menuFactory;

/**
* @var array
* @var array<string, bool>
*/
protected $loaded = [
'view_fields' => false,
Expand All @@ -395,17 +395,17 @@ abstract class AbstractAdmin implements AdminInterface, DomainObjectInterface, A
];

/**
* @var array
* @var string[]
*/
protected $formTheme = [];

/**
* @var array
* @var string[]
*/
protected $filterTheme = [];

/**
* @var array
* @var array<string, string>
*
* @deprecated since 3.34, will be dropped in 4.0. Use TemplateRegistry services instead
*/
Expand Down Expand Up @@ -477,14 +477,14 @@ abstract class AbstractAdmin implements AdminInterface, DomainObjectInterface, A
/**
* The subclasses supported by the admin class.
*
* @var array
* @var array<string, string>
*/
private $subClasses = [];

/**
* The list collection.
*
* @var array
* @var FieldDescriptionCollection
*/
private $list;

Expand Down Expand Up @@ -720,6 +720,9 @@ public function delete($object)
}
}

/**
* @param object $object
*/
public function preValidate($object)
{
}
Expand Down Expand Up @@ -1195,6 +1198,12 @@ public function hasRoute($name)
return $this->routeGenerator->hasAdminRoute($this, $name);
}

/**
* @param string $name
* @param string|null $adminCode
*
* @return bool
*/
public function isCurrentRoute($name, $adminCode = null)
{
if (!$this->hasRequest()) {
Expand Down Expand Up @@ -1239,6 +1248,9 @@ final public function setTemplateRegistry(MutableTemplateRegistryInterface $temp
$this->templateRegistry = $templateRegistry;
}

/**
* @param array<string, string> $templates
*/
public function setTemplates(array $templates)
{
// NEXT_MAJOR: Remove this line
Expand All @@ -1262,7 +1274,7 @@ public function setTemplate($name, $template)
/**
* @deprecated since 3.34, will be dropped in 4.0. Use TemplateRegistry services instead
*
* @return array
* @return array<string, string>
*/
public function getTemplates()
{
Expand Down Expand Up @@ -2642,6 +2654,12 @@ public function hasAccess($action, $object = null)
return true;
}

/**
* @param string $action
* @param object|null $object
*
* @return array
*/
public function configureActionButtons($action, $object = null)
{
$list = [];
Expand Down Expand Up @@ -3091,7 +3109,7 @@ protected function predefinePerPageOptions()
/**
* Return list routes with permissions name.
*
* @return array
* @return array<string, string>
*/
protected function getAccess()
{
Expand Down
7 changes: 7 additions & 0 deletions src/Admin/AbstractAdminExtension.php
Expand Up @@ -118,6 +118,13 @@ public function postRemove(AdminInterface $admin, $object)
{
}

/**
* @param array $list
* @param string $action
* @param object $object
*
* @return array
*/
public function configureActionButtons(AdminInterface $admin, $list, $action, $object)
{
return $list;
Expand Down

0 comments on commit 6b1c8f7

Please sign in to comment.