Skip to content

Commit

Permalink
Add generic information for child admins
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 authored and franmomu committed Feb 21, 2021
1 parent e4a72b8 commit 2367690
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Admin/AbstractAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,8 @@ public function buildSideMenu($action, ?AdminInterface $childAdmin = null)
* @param string $action
*
* @return ItemInterface
*
* @phpstan-param AdminInterface<object>|null $childAdmin
*/
public function getSideMenu($action, ?AdminInterface $childAdmin = null)
{
Expand Down Expand Up @@ -3023,6 +3025,8 @@ protected function configureBatchActions($actions)
* NEXT_MAJOR: remove this method.
*
* @deprecated Use configureTabMenu instead
*
* @phpstan-param AdminInterface<object>|null $childAdmin
*/
protected function configureSideMenu(ItemInterface $menu, string $action, ?AdminInterface $childAdmin = null)
{
Expand All @@ -3032,6 +3036,8 @@ protected function configureSideMenu(ItemInterface $menu, string $action, ?Admin
* Configures the tab menu in your admin.
*
* @param string $action
*
* @phpstan-param AdminInterface<object>|null $childAdmin
*/
protected function configureTabMenu(ItemInterface $menu, $action, ?AdminInterface $childAdmin = null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Admin/AdminExtensionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function configureRoutes(AdminInterface $admin, RouteCollection $collecti
* @return void
*
* @phpstan-param AdminInterface<T> $admin
* @phpstan-param AdminInterface<T>|null $childAdmin
* @phpstan-param AdminInterface<object>|null $childAdmin
*
* @deprecated
*/
Expand All @@ -94,7 +94,7 @@ public function configureSideMenu(
* @return void
*
* @phpstan-param AdminInterface<T> $admin
* @phpstan-param AdminInterface<T>|null $childAdmin
* @phpstan-param AdminInterface<object>|null $childAdmin
*/
public function configureTabMenu(
AdminInterface $admin,
Expand Down
4 changes: 4 additions & 0 deletions src/Admin/MenuBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ interface MenuBuilderInterface
* @return ItemInterface|bool
*
* @deprecated Use buildTabMenu instead
*
* @phpstan-param AdminInterface<object>|null $childAdmin
*/
public function buildSideMenu($action, ?AdminInterface $childAdmin = null);

Expand All @@ -39,6 +41,8 @@ public function buildSideMenu($action, ?AdminInterface $childAdmin = null);
* @param string $action
*
* @return ItemInterface|bool
*
* @phpstan-param AdminInterface<object>|null $childAdmin
*/
public function buildTabMenu($action, ?AdminInterface $childAdmin = null);
}

0 comments on commit 2367690

Please sign in to comment.