Complex classes like AbstractAdmin often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use AbstractAdmin, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 55 | abstract class AbstractAdmin implements AdminInterface, DomainObjectInterface, AdminTreeInterface |
||
| 56 | { |
||
| 57 | const CONTEXT_MENU = 'menu'; |
||
| 58 | const CONTEXT_DASHBOARD = 'dashboard'; |
||
| 59 | |||
| 60 | const CLASS_REGEX = |
||
| 61 | '@ |
||
| 62 | (?:([A-Za-z0-9]*)\\\)? # vendor name / app name |
||
| 63 | (Bundle\\\)? # optional bundle directory |
||
| 64 | ([A-Za-z0-9]+?)(?:Bundle)?\\\ # bundle name, with optional suffix |
||
| 65 | ( |
||
| 66 | Entity|Document|Model|PHPCR|CouchDocument|Phpcr| |
||
| 67 | Doctrine\\\Orm|Doctrine\\\Phpcr|Doctrine\\\MongoDB|Doctrine\\\CouchDB |
||
| 68 | )\\\(.*)@x'; |
||
| 69 | |||
| 70 | const MOSAIC_ICON_CLASS = 'fa fa-th-large fa-fw'; |
||
| 71 | |||
| 72 | /** |
||
| 73 | * The list FieldDescription constructed from the configureListField method. |
||
| 74 | * |
||
| 75 | * @var array |
||
| 76 | */ |
||
| 77 | protected $listFieldDescriptions = []; |
||
| 78 | |||
| 79 | /** |
||
| 80 | * The show FieldDescription constructed from the configureShowFields method. |
||
| 81 | * |
||
| 82 | * @var array |
||
| 83 | */ |
||
| 84 | protected $showFieldDescriptions = []; |
||
| 85 | |||
| 86 | /** |
||
| 87 | * The list FieldDescription constructed from the configureFormField method. |
||
| 88 | * |
||
| 89 | * @var array |
||
| 90 | */ |
||
| 91 | protected $formFieldDescriptions = []; |
||
| 92 | |||
| 93 | /** |
||
| 94 | * The filter FieldDescription constructed from the configureFilterField method. |
||
| 95 | * |
||
| 96 | * @var array |
||
| 97 | */ |
||
| 98 | protected $filterFieldDescriptions = []; |
||
| 99 | |||
| 100 | /** |
||
| 101 | * The number of result to display in the list. |
||
| 102 | * |
||
| 103 | * @var int |
||
| 104 | */ |
||
| 105 | protected $maxPerPage = 32; |
||
| 106 | |||
| 107 | /** |
||
| 108 | * The maximum number of page numbers to display in the list. |
||
| 109 | * |
||
| 110 | * @var int |
||
| 111 | */ |
||
| 112 | protected $maxPageLinks = 25; |
||
| 113 | |||
| 114 | /** |
||
| 115 | * The base route name used to generate the routing information. |
||
| 116 | * |
||
| 117 | * @var string |
||
| 118 | */ |
||
| 119 | protected $baseRouteName; |
||
| 120 | |||
| 121 | /** |
||
| 122 | * The base route pattern used to generate the routing information. |
||
| 123 | * |
||
| 124 | * @var string |
||
| 125 | */ |
||
| 126 | protected $baseRoutePattern; |
||
| 127 | |||
| 128 | /** |
||
| 129 | * The base name controller used to generate the routing information. |
||
| 130 | * |
||
| 131 | * @var string |
||
| 132 | */ |
||
| 133 | protected $baseControllerName; |
||
| 134 | |||
| 135 | /** |
||
| 136 | * The label class name (used in the title/breadcrumb ...). |
||
| 137 | * |
||
| 138 | * @var string |
||
| 139 | */ |
||
| 140 | protected $classnameLabel; |
||
| 141 | |||
| 142 | /** |
||
| 143 | * The translation domain to be used to translate messages. |
||
| 144 | * |
||
| 145 | * @var string |
||
| 146 | */ |
||
| 147 | protected $translationDomain = 'messages'; |
||
| 148 | |||
| 149 | /** |
||
| 150 | * Options to set to the form (ie, validation_groups). |
||
| 151 | * |
||
| 152 | * @var array |
||
| 153 | */ |
||
| 154 | protected $formOptions = []; |
||
| 155 | |||
| 156 | /** |
||
| 157 | * Default values to the datagrid. |
||
| 158 | * |
||
| 159 | * @var array |
||
| 160 | */ |
||
| 161 | protected $datagridValues = [ |
||
| 162 | '_page' => 1, |
||
| 163 | '_per_page' => 32, |
||
| 164 | ]; |
||
| 165 | |||
| 166 | /** |
||
| 167 | * Predefined per page options. |
||
| 168 | * |
||
| 169 | * @var array |
||
| 170 | */ |
||
| 171 | protected $perPageOptions = [16, 32, 64, 128, 192]; |
||
| 172 | |||
| 173 | /** |
||
| 174 | * Pager type. |
||
| 175 | * |
||
| 176 | * @var string |
||
| 177 | */ |
||
| 178 | protected $pagerType = Pager::TYPE_DEFAULT; |
||
| 179 | |||
| 180 | /** |
||
| 181 | * The code related to the admin. |
||
| 182 | * |
||
| 183 | * @var string |
||
| 184 | */ |
||
| 185 | protected $code; |
||
| 186 | |||
| 187 | /** |
||
| 188 | * The label. |
||
| 189 | * |
||
| 190 | * @var string |
||
| 191 | */ |
||
| 192 | protected $label; |
||
| 193 | |||
| 194 | /** |
||
| 195 | * Whether or not to persist the filters in the session. |
||
| 196 | * |
||
| 197 | * @var bool |
||
| 198 | */ |
||
| 199 | protected $persistFilters = false; |
||
| 200 | |||
| 201 | /** |
||
| 202 | * Array of routes related to this admin. |
||
| 203 | * |
||
| 204 | * @var RouteCollection |
||
| 205 | */ |
||
| 206 | protected $routes; |
||
| 207 | |||
| 208 | /** |
||
| 209 | * The subject only set in edit/update/create mode. |
||
| 210 | * |
||
| 211 | * @var object |
||
| 212 | */ |
||
| 213 | protected $subject; |
||
| 214 | |||
| 215 | /** |
||
| 216 | * Define a Collection of child admin, ie /admin/order/{id}/order-element/{childId}. |
||
| 217 | * |
||
| 218 | * @var array |
||
| 219 | */ |
||
| 220 | protected $children = []; |
||
| 221 | |||
| 222 | /** |
||
| 223 | * Reference the parent collection. |
||
| 224 | * |
||
| 225 | * @var AdminInterface|null |
||
| 226 | */ |
||
| 227 | protected $parent = null; |
||
| 228 | |||
| 229 | /** |
||
| 230 | * The related parent association, ie if OrderElement has a parent property named order, |
||
| 231 | * then the $parentAssociationMapping must be a string named `order`. |
||
| 232 | * |
||
| 233 | * @var string |
||
| 234 | */ |
||
| 235 | protected $parentAssociationMapping = null; |
||
| 236 | |||
| 237 | /** |
||
| 238 | * Reference the parent FieldDescription related to this admin |
||
| 239 | * only set for FieldDescription which is associated to an Sub Admin instance. |
||
| 240 | * |
||
| 241 | * @var FieldDescriptionInterface |
||
| 242 | */ |
||
| 243 | protected $parentFieldDescription; |
||
| 244 | |||
| 245 | /** |
||
| 246 | * If true then the current admin is part of the nested admin set (from the url). |
||
| 247 | * |
||
| 248 | * @var bool |
||
| 249 | */ |
||
| 250 | protected $currentChild = false; |
||
| 251 | |||
| 252 | /** |
||
| 253 | * The uniqid is used to avoid clashing with 2 admin related to the code |
||
| 254 | * ie: a Block linked to a Block. |
||
| 255 | * |
||
| 256 | * @var string |
||
| 257 | */ |
||
| 258 | protected $uniqid; |
||
| 259 | |||
| 260 | /** |
||
| 261 | * The Entity or Document manager. |
||
| 262 | * |
||
| 263 | * @var ModelManagerInterface |
||
| 264 | */ |
||
| 265 | protected $modelManager; |
||
| 266 | |||
| 267 | /** |
||
| 268 | * The current request object. |
||
| 269 | * |
||
| 270 | * @var \Symfony\Component\HttpFoundation\Request |
||
| 271 | */ |
||
| 272 | protected $request; |
||
| 273 | |||
| 274 | /** |
||
| 275 | * The translator component. |
||
| 276 | * |
||
| 277 | * NEXT_MAJOR: remove this property |
||
| 278 | * |
||
| 279 | * @var \Symfony\Component\Translation\TranslatorInterface |
||
| 280 | * |
||
| 281 | * @deprecated since 3.9, to be removed with 4.0 |
||
| 282 | */ |
||
| 283 | protected $translator; |
||
| 284 | |||
| 285 | /** |
||
| 286 | * The related form contractor. |
||
| 287 | * |
||
| 288 | * @var FormContractorInterface |
||
| 289 | */ |
||
| 290 | protected $formContractor; |
||
| 291 | |||
| 292 | /** |
||
| 293 | * The related list builder. |
||
| 294 | * |
||
| 295 | * @var ListBuilderInterface |
||
| 296 | */ |
||
| 297 | protected $listBuilder; |
||
| 298 | |||
| 299 | /** |
||
| 300 | * The related view builder. |
||
| 301 | * |
||
| 302 | * @var ShowBuilderInterface |
||
| 303 | */ |
||
| 304 | protected $showBuilder; |
||
| 305 | |||
| 306 | /** |
||
| 307 | * The related datagrid builder. |
||
| 308 | * |
||
| 309 | * @var DatagridBuilderInterface |
||
| 310 | */ |
||
| 311 | protected $datagridBuilder; |
||
| 312 | |||
| 313 | /** |
||
| 314 | * @var RouteBuilderInterface |
||
| 315 | */ |
||
| 316 | protected $routeBuilder; |
||
| 317 | |||
| 318 | /** |
||
| 319 | * The datagrid instance. |
||
| 320 | * |
||
| 321 | * @var \Sonata\AdminBundle\Datagrid\DatagridInterface |
||
| 322 | */ |
||
| 323 | protected $datagrid; |
||
| 324 | |||
| 325 | /** |
||
| 326 | * The router instance. |
||
| 327 | * |
||
| 328 | * @var RouteGeneratorInterface |
||
| 329 | */ |
||
| 330 | protected $routeGenerator; |
||
| 331 | |||
| 332 | /** |
||
| 333 | * @var SecurityHandlerInterface |
||
| 334 | */ |
||
| 335 | protected $securityHandler = null; |
||
| 336 | |||
| 337 | /** |
||
| 338 | * @var ValidatorInterface|LegacyValidatorInterface |
||
| 339 | */ |
||
| 340 | protected $validator = null; |
||
| 341 | |||
| 342 | /** |
||
| 343 | * The configuration pool. |
||
| 344 | * |
||
| 345 | * @var Pool |
||
| 346 | */ |
||
| 347 | protected $configurationPool; |
||
| 348 | |||
| 349 | /** |
||
| 350 | * @var MenuItemInterface |
||
| 351 | */ |
||
| 352 | protected $menu; |
||
| 353 | |||
| 354 | /** |
||
| 355 | * @var MenuFactoryInterface |
||
| 356 | */ |
||
| 357 | protected $menuFactory; |
||
| 358 | |||
| 359 | /** |
||
| 360 | * @var array |
||
| 361 | */ |
||
| 362 | protected $loaded = [ |
||
| 363 | 'view_fields' => false, |
||
| 364 | 'view_groups' => false, |
||
| 365 | 'routes' => false, |
||
| 366 | 'tab_menu' => false, |
||
| 367 | ]; |
||
| 368 | |||
| 369 | /** |
||
| 370 | * @var array |
||
| 371 | */ |
||
| 372 | protected $formTheme = []; |
||
| 373 | |||
| 374 | /** |
||
| 375 | * @var array |
||
| 376 | */ |
||
| 377 | protected $filterTheme = []; |
||
| 378 | |||
| 379 | /** |
||
| 380 | * @var array |
||
| 381 | */ |
||
| 382 | protected $templates = []; |
||
| 383 | |||
| 384 | /** |
||
| 385 | * @var AdminExtensionInterface[] |
||
| 386 | */ |
||
| 387 | protected $extensions = []; |
||
| 388 | |||
| 389 | /** |
||
| 390 | * @var LabelTranslatorStrategyInterface |
||
| 391 | */ |
||
| 392 | protected $labelTranslatorStrategy; |
||
| 393 | |||
| 394 | /** |
||
| 395 | * Setting to true will enable preview mode for |
||
| 396 | * the entity and show a preview button in the |
||
| 397 | * edit/create forms. |
||
| 398 | * |
||
| 399 | * @var bool |
||
| 400 | */ |
||
| 401 | protected $supportsPreviewMode = false; |
||
| 402 | |||
| 403 | /** |
||
| 404 | * Roles and permissions per role. |
||
| 405 | * |
||
| 406 | * @var array [role] => array([permission], [permission]) |
||
| 407 | */ |
||
| 408 | protected $securityInformation = []; |
||
| 409 | |||
| 410 | protected $cacheIsGranted = []; |
||
| 411 | |||
| 412 | /** |
||
| 413 | * Action list for the search result. |
||
| 414 | * |
||
| 415 | * @var string[] |
||
| 416 | */ |
||
| 417 | protected $searchResultActions = ['edit', 'show']; |
||
| 418 | |||
| 419 | protected $listModes = [ |
||
| 420 | 'list' => [ |
||
| 421 | 'class' => 'fa fa-list fa-fw', |
||
| 422 | ], |
||
| 423 | 'mosaic' => [ |
||
| 424 | 'class' => self::MOSAIC_ICON_CLASS, |
||
| 425 | ], |
||
| 426 | ]; |
||
| 427 | |||
| 428 | /** |
||
| 429 | * The Access mapping. |
||
| 430 | * |
||
| 431 | * @var array [action1 => requiredRole1, action2 => [requiredRole2, requiredRole3]] |
||
| 432 | */ |
||
| 433 | protected $accessMapping = []; |
||
| 434 | |||
| 435 | /** |
||
| 436 | * The class name managed by the admin class. |
||
| 437 | * |
||
| 438 | * @var string |
||
| 439 | */ |
||
| 440 | private $class; |
||
| 441 | |||
| 442 | /** |
||
| 443 | * The subclasses supported by the admin class. |
||
| 444 | * |
||
| 445 | * @var array |
||
| 446 | */ |
||
| 447 | private $subClasses = []; |
||
| 448 | |||
| 449 | /** |
||
| 450 | * The list collection. |
||
| 451 | * |
||
| 452 | * @var array |
||
| 453 | */ |
||
| 454 | private $list; |
||
| 455 | |||
| 456 | /** |
||
| 457 | * @var FieldDescriptionCollection |
||
| 458 | */ |
||
| 459 | private $show; |
||
| 460 | |||
| 461 | /** |
||
| 462 | * @var Form |
||
| 463 | */ |
||
| 464 | private $form; |
||
| 465 | |||
| 466 | /** |
||
| 467 | * @var DatagridInterface |
||
| 468 | */ |
||
| 469 | private $filter; |
||
|
|
|||
| 470 | |||
| 471 | /** |
||
| 472 | * The cached base route name. |
||
| 473 | * |
||
| 474 | * @var string |
||
| 475 | */ |
||
| 476 | private $cachedBaseRouteName; |
||
| 477 | |||
| 478 | /** |
||
| 479 | * The cached base route pattern. |
||
| 480 | * |
||
| 481 | * @var string |
||
| 482 | */ |
||
| 483 | private $cachedBaseRoutePattern; |
||
| 484 | |||
| 485 | /** |
||
| 486 | * The form group disposition. |
||
| 487 | * |
||
| 488 | * @var array|bool |
||
| 489 | */ |
||
| 490 | private $formGroups = false; |
||
| 491 | |||
| 492 | /** |
||
| 493 | * The form tabs disposition. |
||
| 494 | * |
||
| 495 | * @var array|bool |
||
| 496 | */ |
||
| 497 | private $formTabs = false; |
||
| 498 | |||
| 499 | /** |
||
| 500 | * The view group disposition. |
||
| 501 | * |
||
| 502 | * @var array|bool |
||
| 503 | */ |
||
| 504 | private $showGroups = false; |
||
| 505 | |||
| 506 | /** |
||
| 507 | * The view tab disposition. |
||
| 508 | * |
||
| 509 | * @var array|bool |
||
| 510 | */ |
||
| 511 | private $showTabs = false; |
||
| 512 | |||
| 513 | /** |
||
| 514 | * The manager type to use for the admin. |
||
| 515 | * |
||
| 516 | * @var string |
||
| 517 | */ |
||
| 518 | private $managerType; |
||
| 519 | |||
| 520 | /** |
||
| 521 | * @param string $code |
||
| 522 | * @param string $class |
||
| 523 | * @param string $baseControllerName |
||
| 524 | */ |
||
| 525 | public function __construct($code, $class, $baseControllerName) |
||
| 534 | |||
| 535 | /** |
||
| 536 | * {@inheritdoc} |
||
| 537 | * |
||
| 538 | * NEXT_MAJOR: return null to indicate no override |
||
| 539 | */ |
||
| 540 | public function getExportFormats() |
||
| 546 | |||
| 547 | /** |
||
| 548 | * {@inheritdoc} |
||
| 549 | */ |
||
| 550 | public function getExportFields() |
||
| 562 | |||
| 563 | /** |
||
| 564 | * {@inheritdoc} |
||
| 565 | */ |
||
| 566 | public function getDataSourceIterator() |
||
| 588 | |||
| 589 | /** |
||
| 590 | * {@inheritdoc} |
||
| 591 | */ |
||
| 592 | public function validate(ErrorElement $errorElement, $object) |
||
| 595 | |||
| 596 | /** |
||
| 597 | * define custom variable. |
||
| 598 | */ |
||
| 599 | public function initialize() |
||
| 607 | |||
| 608 | /** |
||
| 609 | * {@inheritdoc} |
||
| 610 | */ |
||
| 611 | public function update($object) |
||
| 631 | |||
| 632 | /** |
||
| 633 | * {@inheritdoc} |
||
| 634 | */ |
||
| 635 | public function create($object) |
||
| 657 | |||
| 658 | /** |
||
| 659 | * {@inheritdoc} |
||
| 660 | */ |
||
| 661 | public function delete($object) |
||
| 676 | |||
| 677 | /** |
||
| 678 | * {@inheritdoc} |
||
| 679 | */ |
||
| 680 | public function preValidate($object) |
||
| 683 | |||
| 684 | /** |
||
| 685 | * {@inheritdoc} |
||
| 686 | */ |
||
| 687 | public function preUpdate($object) |
||
| 690 | |||
| 691 | /** |
||
| 692 | * {@inheritdoc} |
||
| 693 | */ |
||
| 694 | public function postUpdate($object) |
||
| 697 | |||
| 698 | /** |
||
| 699 | * {@inheritdoc} |
||
| 700 | */ |
||
| 701 | public function prePersist($object) |
||
| 704 | |||
| 705 | /** |
||
| 706 | * {@inheritdoc} |
||
| 707 | */ |
||
| 708 | public function postPersist($object) |
||
| 711 | |||
| 712 | /** |
||
| 713 | * {@inheritdoc} |
||
| 714 | */ |
||
| 715 | public function preRemove($object) |
||
| 718 | |||
| 719 | /** |
||
| 720 | * {@inheritdoc} |
||
| 721 | */ |
||
| 722 | public function postRemove($object) |
||
| 725 | |||
| 726 | /** |
||
| 727 | * {@inheritdoc} |
||
| 728 | */ |
||
| 729 | public function preBatchAction($actionName, ProxyQueryInterface $query, array &$idx, $allElements) |
||
| 732 | |||
| 733 | /** |
||
| 734 | * {@inheritdoc} |
||
| 735 | */ |
||
| 736 | public function getFilterParameters() |
||
| 773 | |||
| 774 | /** |
||
| 775 | * Returns the name of the parent related field, so the field can be use to set the default |
||
| 776 | * value (ie the parent object) or to filter the object. |
||
| 777 | * |
||
| 778 | * @return string the name of the parent related field |
||
| 779 | */ |
||
| 780 | public function getParentAssociationMapping() |
||
| 784 | |||
| 785 | /** |
||
| 786 | * Returns the baseRoutePattern used to generate the routing information. |
||
| 787 | * |
||
| 788 | * @throws \RuntimeException |
||
| 789 | * |
||
| 790 | * @return string the baseRoutePattern used to generate the routing information |
||
| 791 | */ |
||
| 792 | public function getBaseRoutePattern() |
||
| 830 | |||
| 831 | /** |
||
| 832 | * Returns the baseRouteName used to generate the routing information. |
||
| 833 | * |
||
| 834 | * @throws \RuntimeException |
||
| 835 | * |
||
| 836 | * @return string the baseRouteName used to generate the routing information |
||
| 837 | */ |
||
| 838 | public function getBaseRouteName() |
||
| 875 | |||
| 876 | /** |
||
| 877 | * {@inheritdoc} |
||
| 878 | */ |
||
| 879 | public function getClass() |
||
| 906 | |||
| 907 | /** |
||
| 908 | * {@inheritdoc} |
||
| 909 | */ |
||
| 910 | public function getSubClasses() |
||
| 914 | |||
| 915 | /** |
||
| 916 | * {@inheritdoc} |
||
| 917 | */ |
||
| 918 | public function addSubClass($subClass) |
||
| 924 | |||
| 925 | /** |
||
| 926 | * {@inheritdoc} |
||
| 927 | */ |
||
| 928 | public function setSubClasses(array $subClasses) |
||
| 932 | |||
| 933 | /** |
||
| 934 | * {@inheritdoc} |
||
| 935 | */ |
||
| 936 | public function hasSubClass($name) |
||
| 940 | |||
| 941 | /** |
||
| 942 | * {@inheritdoc} |
||
| 943 | */ |
||
| 944 | public function hasActiveSubClass() |
||
| 952 | |||
| 953 | /** |
||
| 954 | * {@inheritdoc} |
||
| 955 | */ |
||
| 956 | public function getActiveSubClass() |
||
| 964 | |||
| 965 | /** |
||
| 966 | * {@inheritdoc} |
||
| 967 | */ |
||
| 968 | public function getActiveSubclassCode() |
||
| 982 | |||
| 983 | /** |
||
| 984 | * {@inheritdoc} |
||
| 985 | */ |
||
| 986 | final public function getBatchActions() |
||
| 1016 | |||
| 1017 | /** |
||
| 1018 | * {@inheritdoc} |
||
| 1019 | */ |
||
| 1020 | public function getRoutes() |
||
| 1026 | |||
| 1027 | /** |
||
| 1028 | * {@inheritdoc} |
||
| 1029 | */ |
||
| 1030 | public function getRouterIdParameter() |
||
| 1034 | |||
| 1035 | /** |
||
| 1036 | * {@inheritdoc} |
||
| 1037 | */ |
||
| 1038 | public function getIdParameter() |
||
| 1048 | |||
| 1049 | /** |
||
| 1050 | * {@inheritdoc} |
||
| 1051 | */ |
||
| 1052 | public function hasRoute($name) |
||
| 1060 | |||
| 1061 | /** |
||
| 1062 | * {@inheritdoc} |
||
| 1063 | */ |
||
| 1064 | public function isCurrentRoute($name, $adminCode = null) |
||
| 1085 | |||
| 1086 | /** |
||
| 1087 | * {@inheritdoc} |
||
| 1088 | */ |
||
| 1089 | public function generateObjectUrl($name, $object, array $parameters = [], $absolute = RoutingUrlGeneratorInterface::ABSOLUTE_PATH) |
||
| 1095 | |||
| 1096 | /** |
||
| 1097 | * {@inheritdoc} |
||
| 1098 | */ |
||
| 1099 | public function generateUrl($name, array $parameters = [], $absolute = RoutingUrlGeneratorInterface::ABSOLUTE_PATH) |
||
| 1103 | |||
| 1104 | /** |
||
| 1105 | * {@inheritdoc} |
||
| 1106 | */ |
||
| 1107 | public function generateMenuUrl($name, array $parameters = [], $absolute = RoutingUrlGeneratorInterface::ABSOLUTE_PATH) |
||
| 1111 | |||
| 1112 | /** |
||
| 1113 | * {@inheritdoc} |
||
| 1114 | */ |
||
| 1115 | public function setTemplates(array $templates) |
||
| 1119 | |||
| 1120 | /** |
||
| 1121 | * {@inheritdoc} |
||
| 1122 | */ |
||
| 1123 | public function setTemplate($name, $template) |
||
| 1127 | |||
| 1128 | /** |
||
| 1129 | * {@inheritdoc} |
||
| 1130 | */ |
||
| 1131 | public function getTemplates() |
||
| 1135 | |||
| 1136 | /** |
||
| 1137 | * {@inheritdoc} |
||
| 1138 | */ |
||
| 1139 | public function getTemplate($name) |
||
| 1145 | |||
| 1146 | /** |
||
| 1147 | * {@inheritdoc} |
||
| 1148 | */ |
||
| 1149 | public function getNewInstance() |
||
| 1158 | |||
| 1159 | /** |
||
| 1160 | * {@inheritdoc} |
||
| 1161 | */ |
||
| 1162 | public function getFormBuilder() |
||
| 1175 | |||
| 1176 | /** |
||
| 1177 | * This method is being called by the main admin class and the child class, |
||
| 1178 | * the getFormBuilder is only call by the main admin class. |
||
| 1179 | * |
||
| 1180 | * @param FormBuilderInterface $formBuilder |
||
| 1181 | */ |
||
| 1182 | public function defineFormBuilder(FormBuilderInterface $formBuilder) |
||
| 1194 | |||
| 1195 | /** |
||
| 1196 | * {@inheritdoc} |
||
| 1197 | */ |
||
| 1198 | public function attachAdminClass(FieldDescriptionInterface $fieldDescription) |
||
| 1220 | |||
| 1221 | /** |
||
| 1222 | * {@inheritdoc} |
||
| 1223 | */ |
||
| 1224 | public function getObject($id) |
||
| 1233 | |||
| 1234 | /** |
||
| 1235 | * {@inheritdoc} |
||
| 1236 | */ |
||
| 1237 | public function getForm() |
||
| 1243 | |||
| 1244 | /** |
||
| 1245 | * {@inheritdoc} |
||
| 1246 | */ |
||
| 1247 | public function getList() |
||
| 1253 | |||
| 1254 | /** |
||
| 1255 | * {@inheritdoc} |
||
| 1256 | */ |
||
| 1257 | public function createQuery($context = 'list') |
||
| 1273 | |||
| 1274 | /** |
||
| 1275 | * {@inheritdoc} |
||
| 1276 | */ |
||
| 1277 | public function getDatagrid() |
||
| 1283 | |||
| 1284 | /** |
||
| 1285 | * {@inheritdoc} |
||
| 1286 | */ |
||
| 1287 | public function buildTabMenu($action, AdminInterface $childAdmin = null) |
||
| 1312 | |||
| 1313 | /** |
||
| 1314 | * @param string $action |
||
| 1315 | * @param AdminInterface $childAdmin |
||
| 1316 | * |
||
| 1317 | * @return ItemInterface |
||
| 1318 | */ |
||
| 1319 | public function getSideMenu($action, AdminInterface $childAdmin = null) |
||
| 1329 | |||
| 1330 | /** |
||
| 1331 | * Returns the root code. |
||
| 1332 | * |
||
| 1333 | * @return string the root code |
||
| 1334 | */ |
||
| 1335 | public function getRootCode() |
||
| 1339 | |||
| 1340 | /** |
||
| 1341 | * Returns the master admin. |
||
| 1342 | * |
||
| 1343 | * @return AbstractAdmin the root admin class |
||
| 1344 | */ |
||
| 1345 | public function getRoot() |
||
| 1355 | |||
| 1356 | /** |
||
| 1357 | * {@inheritdoc} |
||
| 1358 | */ |
||
| 1359 | public function setBaseControllerName($baseControllerName) |
||
| 1363 | |||
| 1364 | /** |
||
| 1365 | * {@inheritdoc} |
||
| 1366 | */ |
||
| 1367 | public function getBaseControllerName() |
||
| 1371 | |||
| 1372 | /** |
||
| 1373 | * @param string $label |
||
| 1374 | */ |
||
| 1375 | public function setLabel($label) |
||
| 1379 | |||
| 1380 | /** |
||
| 1381 | * {@inheritdoc} |
||
| 1382 | */ |
||
| 1383 | public function getLabel() |
||
| 1387 | |||
| 1388 | /** |
||
| 1389 | * @param bool $persist |
||
| 1390 | */ |
||
| 1391 | public function setPersistFilters($persist) |
||
| 1395 | |||
| 1396 | /** |
||
| 1397 | * @param int $maxPerPage |
||
| 1398 | */ |
||
| 1399 | public function setMaxPerPage($maxPerPage) |
||
| 1403 | |||
| 1404 | /** |
||
| 1405 | * @return int |
||
| 1406 | */ |
||
| 1407 | public function getMaxPerPage() |
||
| 1411 | |||
| 1412 | /** |
||
| 1413 | * @param int $maxPageLinks |
||
| 1414 | */ |
||
| 1415 | public function setMaxPageLinks($maxPageLinks) |
||
| 1419 | |||
| 1420 | /** |
||
| 1421 | * @return int |
||
| 1422 | */ |
||
| 1423 | public function getMaxPageLinks() |
||
| 1427 | |||
| 1428 | /** |
||
| 1429 | * {@inheritdoc} |
||
| 1430 | */ |
||
| 1431 | public function getFormGroups() |
||
| 1435 | |||
| 1436 | /** |
||
| 1437 | * {@inheritdoc} |
||
| 1438 | */ |
||
| 1439 | public function setFormGroups(array $formGroups) |
||
| 1443 | |||
| 1444 | /** |
||
| 1445 | * {@inheritdoc} |
||
| 1446 | */ |
||
| 1447 | public function removeFieldFromFormGroup($key) |
||
| 1457 | |||
| 1458 | /** |
||
| 1459 | * @param array $group |
||
| 1460 | * @param array $keys |
||
| 1461 | */ |
||
| 1462 | public function reorderFormGroup($group, array $keys) |
||
| 1468 | |||
| 1469 | /** |
||
| 1470 | * {@inheritdoc} |
||
| 1471 | */ |
||
| 1472 | public function getFormTabs() |
||
| 1476 | |||
| 1477 | /** |
||
| 1478 | * {@inheritdoc} |
||
| 1479 | */ |
||
| 1480 | public function setFormTabs(array $formTabs) |
||
| 1484 | |||
| 1485 | /** |
||
| 1486 | * {@inheritdoc} |
||
| 1487 | */ |
||
| 1488 | public function getShowTabs() |
||
| 1492 | |||
| 1493 | /** |
||
| 1494 | * {@inheritdoc} |
||
| 1495 | */ |
||
| 1496 | public function setShowTabs(array $showTabs) |
||
| 1500 | |||
| 1501 | /** |
||
| 1502 | * {@inheritdoc} |
||
| 1503 | */ |
||
| 1504 | public function getShowGroups() |
||
| 1508 | |||
| 1509 | /** |
||
| 1510 | * {@inheritdoc} |
||
| 1511 | */ |
||
| 1512 | public function setShowGroups(array $showGroups) |
||
| 1516 | |||
| 1517 | /** |
||
| 1518 | * {@inheritdoc} |
||
| 1519 | */ |
||
| 1520 | public function reorderShowGroup($group, array $keys) |
||
| 1526 | |||
| 1527 | /** |
||
| 1528 | * {@inheritdoc} |
||
| 1529 | */ |
||
| 1530 | public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription) |
||
| 1534 | |||
| 1535 | /** |
||
| 1536 | * {@inheritdoc} |
||
| 1537 | */ |
||
| 1538 | public function getParentFieldDescription() |
||
| 1542 | |||
| 1543 | /** |
||
| 1544 | * {@inheritdoc} |
||
| 1545 | */ |
||
| 1546 | public function hasParentFieldDescription() |
||
| 1550 | |||
| 1551 | /** |
||
| 1552 | * {@inheritdoc} |
||
| 1553 | */ |
||
| 1554 | public function setSubject($subject) |
||
| 1571 | |||
| 1572 | /** |
||
| 1573 | * {@inheritdoc} |
||
| 1574 | */ |
||
| 1575 | public function getSubject() |
||
| 1587 | |||
| 1588 | /** |
||
| 1589 | * {@inheritdoc} |
||
| 1590 | */ |
||
| 1591 | public function hasSubject() |
||
| 1595 | |||
| 1596 | /** |
||
| 1597 | * {@inheritdoc} |
||
| 1598 | */ |
||
| 1599 | public function getFormFieldDescriptions() |
||
| 1605 | |||
| 1606 | /** |
||
| 1607 | * {@inheritdoc} |
||
| 1608 | */ |
||
| 1609 | public function getFormFieldDescription($name) |
||
| 1613 | |||
| 1614 | /** |
||
| 1615 | * Returns true if the admin has a FieldDescription with the given $name. |
||
| 1616 | * |
||
| 1617 | * @param string $name |
||
| 1618 | * |
||
| 1619 | * @return bool |
||
| 1620 | */ |
||
| 1621 | public function hasFormFieldDescription($name) |
||
| 1625 | |||
| 1626 | /** |
||
| 1627 | * {@inheritdoc} |
||
| 1628 | */ |
||
| 1629 | public function addFormFieldDescription($name, FieldDescriptionInterface $fieldDescription) |
||
| 1633 | |||
| 1634 | /** |
||
| 1635 | * remove a FieldDescription. |
||
| 1636 | * |
||
| 1637 | * @param string $name |
||
| 1638 | */ |
||
| 1639 | public function removeFormFieldDescription($name) |
||
| 1643 | |||
| 1644 | /** |
||
| 1645 | * build and return the collection of form FieldDescription. |
||
| 1646 | * |
||
| 1647 | * @return array collection of form FieldDescription |
||
| 1648 | */ |
||
| 1649 | public function getShowFieldDescriptions() |
||
| 1655 | |||
| 1656 | /** |
||
| 1657 | * Returns the form FieldDescription with the given $name. |
||
| 1658 | * |
||
| 1659 | * @param string $name |
||
| 1660 | * |
||
| 1661 | * @return FieldDescriptionInterface |
||
| 1662 | */ |
||
| 1663 | public function getShowFieldDescription($name) |
||
| 1669 | |||
| 1670 | /** |
||
| 1671 | * {@inheritdoc} |
||
| 1672 | */ |
||
| 1673 | public function hasShowFieldDescription($name) |
||
| 1677 | |||
| 1678 | /** |
||
| 1679 | * {@inheritdoc} |
||
| 1680 | */ |
||
| 1681 | public function addShowFieldDescription($name, FieldDescriptionInterface $fieldDescription) |
||
| 1685 | |||
| 1686 | /** |
||
| 1687 | * {@inheritdoc} |
||
| 1688 | */ |
||
| 1689 | public function removeShowFieldDescription($name) |
||
| 1693 | |||
| 1694 | /** |
||
| 1695 | * {@inheritdoc} |
||
| 1696 | */ |
||
| 1697 | public function getListFieldDescriptions() |
||
| 1703 | |||
| 1704 | /** |
||
| 1705 | * {@inheritdoc} |
||
| 1706 | */ |
||
| 1707 | public function getListFieldDescription($name) |
||
| 1711 | |||
| 1712 | /** |
||
| 1713 | * {@inheritdoc} |
||
| 1714 | */ |
||
| 1715 | public function hasListFieldDescription($name) |
||
| 1721 | |||
| 1722 | /** |
||
| 1723 | * {@inheritdoc} |
||
| 1724 | */ |
||
| 1725 | public function addListFieldDescription($name, FieldDescriptionInterface $fieldDescription) |
||
| 1729 | |||
| 1730 | /** |
||
| 1731 | * {@inheritdoc} |
||
| 1732 | */ |
||
| 1733 | public function removeListFieldDescription($name) |
||
| 1737 | |||
| 1738 | /** |
||
| 1739 | * {@inheritdoc} |
||
| 1740 | */ |
||
| 1741 | public function getFilterFieldDescription($name) |
||
| 1745 | |||
| 1746 | /** |
||
| 1747 | * {@inheritdoc} |
||
| 1748 | */ |
||
| 1749 | public function hasFilterFieldDescription($name) |
||
| 1753 | |||
| 1754 | /** |
||
| 1755 | * {@inheritdoc} |
||
| 1756 | */ |
||
| 1757 | public function addFilterFieldDescription($name, FieldDescriptionInterface $fieldDescription) |
||
| 1761 | |||
| 1762 | /** |
||
| 1763 | * {@inheritdoc} |
||
| 1764 | */ |
||
| 1765 | public function removeFilterFieldDescription($name) |
||
| 1769 | |||
| 1770 | /** |
||
| 1771 | * {@inheritdoc} |
||
| 1772 | */ |
||
| 1773 | public function getFilterFieldDescriptions() |
||
| 1779 | |||
| 1780 | /** |
||
| 1781 | * {@inheritdoc} |
||
| 1782 | */ |
||
| 1783 | public function addChild(AdminInterface $child) |
||
| 1800 | |||
| 1801 | /** |
||
| 1802 | * {@inheritdoc} |
||
| 1803 | */ |
||
| 1804 | public function hasChild($code) |
||
| 1808 | |||
| 1809 | /** |
||
| 1810 | * {@inheritdoc} |
||
| 1811 | */ |
||
| 1812 | public function getChildren() |
||
| 1816 | |||
| 1817 | /** |
||
| 1818 | * {@inheritdoc} |
||
| 1819 | */ |
||
| 1820 | public function getChild($code) |
||
| 1824 | |||
| 1825 | /** |
||
| 1826 | * {@inheritdoc} |
||
| 1827 | */ |
||
| 1828 | public function setParent(AdminInterface $parent) |
||
| 1832 | |||
| 1833 | /** |
||
| 1834 | * {@inheritdoc} |
||
| 1835 | */ |
||
| 1836 | public function getParent() |
||
| 1840 | |||
| 1841 | /** |
||
| 1842 | * {@inheritdoc} |
||
| 1843 | */ |
||
| 1844 | final public function getRootAncestor() |
||
| 1854 | |||
| 1855 | /** |
||
| 1856 | * {@inheritdoc} |
||
| 1857 | */ |
||
| 1858 | final public function getChildDepth() |
||
| 1870 | |||
| 1871 | /** |
||
| 1872 | * {@inheritdoc} |
||
| 1873 | */ |
||
| 1874 | final public function getCurrentLeafChildAdmin() |
||
| 1888 | |||
| 1889 | /** |
||
| 1890 | * {@inheritdoc} |
||
| 1891 | */ |
||
| 1892 | public function isChild() |
||
| 1896 | |||
| 1897 | /** |
||
| 1898 | * Returns true if the admin has children, false otherwise. |
||
| 1899 | * |
||
| 1900 | * @return bool if the admin has children |
||
| 1901 | */ |
||
| 1902 | public function hasChildren() |
||
| 1906 | |||
| 1907 | /** |
||
| 1908 | * {@inheritdoc} |
||
| 1909 | */ |
||
| 1910 | public function setUniqid($uniqid) |
||
| 1914 | |||
| 1915 | /** |
||
| 1916 | * {@inheritdoc} |
||
| 1917 | */ |
||
| 1918 | public function getUniqid() |
||
| 1926 | |||
| 1927 | /** |
||
| 1928 | * {@inheritdoc} |
||
| 1929 | */ |
||
| 1930 | public function getClassnameLabel() |
||
| 1934 | |||
| 1935 | /** |
||
| 1936 | * {@inheritdoc} |
||
| 1937 | */ |
||
| 1938 | public function getPersistentParameters() |
||
| 1954 | |||
| 1955 | /** |
||
| 1956 | * {@inheritdoc} |
||
| 1957 | */ |
||
| 1958 | public function getPersistentParameter($name) |
||
| 1964 | |||
| 1965 | /** |
||
| 1966 | * {@inheritdoc} |
||
| 1967 | */ |
||
| 1968 | public function setCurrentChild($currentChild) |
||
| 1972 | |||
| 1973 | /** |
||
| 1974 | * {@inheritdoc} |
||
| 1975 | */ |
||
| 1976 | public function getCurrentChild() |
||
| 1980 | |||
| 1981 | /** |
||
| 1982 | * Returns the current child admin instance. |
||
| 1983 | * |
||
| 1984 | * @return AdminInterface|null the current child admin instance |
||
| 1985 | */ |
||
| 1986 | public function getCurrentChildAdmin() |
||
| 1996 | |||
| 1997 | /** |
||
| 1998 | * {@inheritdoc} |
||
| 1999 | */ |
||
| 2000 | public function trans($id, array $parameters = [], $domain = null, $locale = null) |
||
| 2011 | |||
| 2012 | /** |
||
| 2013 | * Translate a message id. |
||
| 2014 | * |
||
| 2015 | * NEXT_MAJOR: remove this method |
||
| 2016 | * |
||
| 2017 | * @param string $id |
||
| 2018 | * @param int $count |
||
| 2019 | * @param array $parameters |
||
| 2020 | * @param string|null $domain |
||
| 2021 | * @param string|null $locale |
||
| 2022 | * |
||
| 2023 | * @return string the translated string |
||
| 2024 | * |
||
| 2025 | * @deprecated since 3.9, to be removed with 4.0 |
||
| 2026 | */ |
||
| 2027 | public function transChoice($id, $count, array $parameters = [], $domain = null, $locale = null) |
||
| 2038 | |||
| 2039 | /** |
||
| 2040 | * {@inheritdoc} |
||
| 2041 | */ |
||
| 2042 | public function setTranslationDomain($translationDomain) |
||
| 2046 | |||
| 2047 | /** |
||
| 2048 | * {@inheritdoc} |
||
| 2049 | */ |
||
| 2050 | public function getTranslationDomain() |
||
| 2054 | |||
| 2055 | /** |
||
| 2056 | * {@inheritdoc} |
||
| 2057 | * |
||
| 2058 | * NEXT_MAJOR: remove this method |
||
| 2059 | * |
||
| 2060 | * @deprecated since 3.9, to be removed with 4.0 |
||
| 2061 | */ |
||
| 2062 | public function setTranslator(TranslatorInterface $translator) |
||
| 2074 | |||
| 2075 | /** |
||
| 2076 | * {@inheritdoc} |
||
| 2077 | * |
||
| 2078 | * NEXT_MAJOR: remove this method |
||
| 2079 | * |
||
| 2080 | * @deprecated since 3.9, to be removed with 4.0 |
||
| 2081 | */ |
||
| 2082 | public function getTranslator() |
||
| 2091 | |||
| 2092 | /** |
||
| 2093 | * {@inheritdoc} |
||
| 2094 | */ |
||
| 2095 | public function getTranslationLabel($label, $context = '', $type = '') |
||
| 2099 | |||
| 2100 | /** |
||
| 2101 | * {@inheritdoc} |
||
| 2102 | */ |
||
| 2103 | public function setRequest(Request $request) |
||
| 2111 | |||
| 2112 | /** |
||
| 2113 | * {@inheritdoc} |
||
| 2114 | */ |
||
| 2115 | public function getRequest() |
||
| 2123 | |||
| 2124 | /** |
||
| 2125 | * {@inheritdoc} |
||
| 2126 | */ |
||
| 2127 | public function hasRequest() |
||
| 2131 | |||
| 2132 | /** |
||
| 2133 | * {@inheritdoc} |
||
| 2134 | */ |
||
| 2135 | public function setFormContractor(FormContractorInterface $formBuilder) |
||
| 2139 | |||
| 2140 | /** |
||
| 2141 | * @return FormContractorInterface |
||
| 2142 | */ |
||
| 2143 | public function getFormContractor() |
||
| 2147 | |||
| 2148 | /** |
||
| 2149 | * {@inheritdoc} |
||
| 2150 | */ |
||
| 2151 | public function setDatagridBuilder(DatagridBuilderInterface $datagridBuilder) |
||
| 2155 | |||
| 2156 | /** |
||
| 2157 | * {@inheritdoc} |
||
| 2158 | */ |
||
| 2159 | public function getDatagridBuilder() |
||
| 2163 | |||
| 2164 | /** |
||
| 2165 | * {@inheritdoc} |
||
| 2166 | */ |
||
| 2167 | public function setListBuilder(ListBuilderInterface $listBuilder) |
||
| 2171 | |||
| 2172 | /** |
||
| 2173 | * {@inheritdoc} |
||
| 2174 | */ |
||
| 2175 | public function getListBuilder() |
||
| 2179 | |||
| 2180 | /** |
||
| 2181 | * @param ShowBuilderInterface $showBuilder |
||
| 2182 | */ |
||
| 2183 | public function setShowBuilder(ShowBuilderInterface $showBuilder) |
||
| 2187 | |||
| 2188 | /** |
||
| 2189 | * @return ShowBuilderInterface |
||
| 2190 | */ |
||
| 2191 | public function getShowBuilder() |
||
| 2195 | |||
| 2196 | /** |
||
| 2197 | * {@inheritdoc} |
||
| 2198 | */ |
||
| 2199 | public function setConfigurationPool(Pool $configurationPool) |
||
| 2203 | |||
| 2204 | /** |
||
| 2205 | * @return Pool |
||
| 2206 | */ |
||
| 2207 | public function getConfigurationPool() |
||
| 2211 | |||
| 2212 | /** |
||
| 2213 | * {@inheritdoc} |
||
| 2214 | */ |
||
| 2215 | public function setRouteGenerator(RouteGeneratorInterface $routeGenerator) |
||
| 2219 | |||
| 2220 | /** |
||
| 2221 | * @return RouteGeneratorInterface |
||
| 2222 | */ |
||
| 2223 | public function getRouteGenerator() |
||
| 2227 | |||
| 2228 | /** |
||
| 2229 | * {@inheritdoc} |
||
| 2230 | */ |
||
| 2231 | public function getCode() |
||
| 2235 | |||
| 2236 | /** |
||
| 2237 | * {@inheritdoc} |
||
| 2238 | */ |
||
| 2239 | public function getBaseCodeRoute() |
||
| 2247 | |||
| 2248 | /** |
||
| 2249 | * {@inheritdoc} |
||
| 2250 | */ |
||
| 2251 | public function getModelManager() |
||
| 2255 | |||
| 2256 | /** |
||
| 2257 | * @param ModelManagerInterface $modelManager |
||
| 2258 | */ |
||
| 2259 | public function setModelManager(ModelManagerInterface $modelManager) |
||
| 2263 | |||
| 2264 | /** |
||
| 2265 | * {@inheritdoc} |
||
| 2266 | */ |
||
| 2267 | public function getManagerType() |
||
| 2271 | |||
| 2272 | /** |
||
| 2273 | * @param string $type |
||
| 2274 | */ |
||
| 2275 | public function setManagerType($type) |
||
| 2279 | |||
| 2280 | /** |
||
| 2281 | * {@inheritdoc} |
||
| 2282 | */ |
||
| 2283 | public function getObjectIdentifier() |
||
| 2287 | |||
| 2288 | /** |
||
| 2289 | * Set the roles and permissions per role. |
||
| 2290 | * |
||
| 2291 | * @param array $information |
||
| 2292 | */ |
||
| 2293 | public function setSecurityInformation(array $information) |
||
| 2297 | |||
| 2298 | /** |
||
| 2299 | * {@inheritdoc} |
||
| 2300 | */ |
||
| 2301 | public function getSecurityInformation() |
||
| 2305 | |||
| 2306 | /** |
||
| 2307 | * Return the list of permissions the user should have in order to display the admin. |
||
| 2308 | * |
||
| 2309 | * @param string $context |
||
| 2310 | * |
||
| 2311 | * @return array |
||
| 2312 | */ |
||
| 2313 | public function getPermissionsShow($context) |
||
| 2322 | |||
| 2323 | /** |
||
| 2324 | * {@inheritdoc} |
||
| 2325 | */ |
||
| 2326 | public function showIn($context) |
||
| 2335 | |||
| 2336 | /** |
||
| 2337 | * {@inheritdoc} |
||
| 2338 | */ |
||
| 2339 | public function createObjectSecurity($object) |
||
| 2343 | |||
| 2344 | /** |
||
| 2345 | * {@inheritdoc} |
||
| 2346 | */ |
||
| 2347 | public function setSecurityHandler(SecurityHandlerInterface $securityHandler) |
||
| 2351 | |||
| 2352 | /** |
||
| 2353 | * {@inheritdoc} |
||
| 2354 | */ |
||
| 2355 | public function getSecurityHandler() |
||
| 2359 | |||
| 2360 | /** |
||
| 2361 | * {@inheritdoc} |
||
| 2362 | */ |
||
| 2363 | public function isGranted($name, $object = null) |
||
| 2373 | |||
| 2374 | /** |
||
| 2375 | * {@inheritdoc} |
||
| 2376 | */ |
||
| 2377 | public function getUrlsafeIdentifier($entity) |
||
| 2381 | |||
| 2382 | /** |
||
| 2383 | * {@inheritdoc} |
||
| 2384 | */ |
||
| 2385 | public function getNormalizedIdentifier($entity) |
||
| 2389 | |||
| 2390 | /** |
||
| 2391 | * {@inheritdoc} |
||
| 2392 | */ |
||
| 2393 | public function id($entity) |
||
| 2397 | |||
| 2398 | /** |
||
| 2399 | * {@inheritdoc} |
||
| 2400 | */ |
||
| 2401 | public function setValidator($validator) |
||
| 2413 | |||
| 2414 | /** |
||
| 2415 | * {@inheritdoc} |
||
| 2416 | */ |
||
| 2417 | public function getValidator() |
||
| 2421 | |||
| 2422 | /** |
||
| 2423 | * {@inheritdoc} |
||
| 2424 | */ |
||
| 2425 | public function getShow() |
||
| 2431 | |||
| 2432 | /** |
||
| 2433 | * {@inheritdoc} |
||
| 2434 | */ |
||
| 2435 | public function setFormTheme(array $formTheme) |
||
| 2439 | |||
| 2440 | /** |
||
| 2441 | * {@inheritdoc} |
||
| 2442 | */ |
||
| 2443 | public function getFormTheme() |
||
| 2447 | |||
| 2448 | /** |
||
| 2449 | * {@inheritdoc} |
||
| 2450 | */ |
||
| 2451 | public function setFilterTheme(array $filterTheme) |
||
| 2455 | |||
| 2456 | /** |
||
| 2457 | * {@inheritdoc} |
||
| 2458 | */ |
||
| 2459 | public function getFilterTheme() |
||
| 2463 | |||
| 2464 | /** |
||
| 2465 | * {@inheritdoc} |
||
| 2466 | */ |
||
| 2467 | public function addExtension(AdminExtensionInterface $extension) |
||
| 2471 | |||
| 2472 | /** |
||
| 2473 | * {@inheritdoc} |
||
| 2474 | */ |
||
| 2475 | public function getExtensions() |
||
| 2479 | |||
| 2480 | /** |
||
| 2481 | * {@inheritdoc} |
||
| 2482 | */ |
||
| 2483 | public function setMenuFactory(MenuFactoryInterface $menuFactory) |
||
| 2487 | |||
| 2488 | /** |
||
| 2489 | * {@inheritdoc} |
||
| 2490 | */ |
||
| 2491 | public function getMenuFactory() |
||
| 2495 | |||
| 2496 | /** |
||
| 2497 | * {@inheritdoc} |
||
| 2498 | */ |
||
| 2499 | public function setRouteBuilder(RouteBuilderInterface $routeBuilder) |
||
| 2503 | |||
| 2504 | /** |
||
| 2505 | * {@inheritdoc} |
||
| 2506 | */ |
||
| 2507 | public function getRouteBuilder() |
||
| 2511 | |||
| 2512 | /** |
||
| 2513 | * {@inheritdoc} |
||
| 2514 | */ |
||
| 2515 | public function toString($object) |
||
| 2527 | |||
| 2528 | /** |
||
| 2529 | * {@inheritdoc} |
||
| 2530 | */ |
||
| 2531 | public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy) |
||
| 2535 | |||
| 2536 | /** |
||
| 2537 | * {@inheritdoc} |
||
| 2538 | */ |
||
| 2539 | public function getLabelTranslatorStrategy() |
||
| 2543 | |||
| 2544 | /** |
||
| 2545 | * {@inheritdoc} |
||
| 2546 | */ |
||
| 2547 | public function supportsPreviewMode() |
||
| 2551 | |||
| 2552 | /** |
||
| 2553 | * Set custom per page options. |
||
| 2554 | * |
||
| 2555 | * @param array $options |
||
| 2556 | */ |
||
| 2557 | public function setPerPageOptions(array $options) |
||
| 2561 | |||
| 2562 | /** |
||
| 2563 | * Returns predefined per page options. |
||
| 2564 | * |
||
| 2565 | * @return array |
||
| 2566 | */ |
||
| 2567 | public function getPerPageOptions() |
||
| 2571 | |||
| 2572 | /** |
||
| 2573 | * Set pager type. |
||
| 2574 | * |
||
| 2575 | * @param string $pagerType |
||
| 2576 | */ |
||
| 2577 | public function setPagerType($pagerType) |
||
| 2581 | |||
| 2582 | /** |
||
| 2583 | * Get pager type. |
||
| 2584 | * |
||
| 2585 | * @return string |
||
| 2586 | */ |
||
| 2587 | public function getPagerType() |
||
| 2591 | |||
| 2592 | /** |
||
| 2593 | * Returns true if the per page value is allowed, false otherwise. |
||
| 2594 | * |
||
| 2595 | * @param int $perPage |
||
| 2596 | * |
||
| 2597 | * @return bool |
||
| 2598 | */ |
||
| 2599 | public function determinedPerPageValue($perPage) |
||
| 2603 | |||
| 2604 | /** |
||
| 2605 | * {@inheritdoc} |
||
| 2606 | */ |
||
| 2607 | public function isAclEnabled() |
||
| 2611 | |||
| 2612 | /** |
||
| 2613 | * {@inheritdoc} |
||
| 2614 | */ |
||
| 2615 | public function getObjectMetadata($object) |
||
| 2619 | |||
| 2620 | /** |
||
| 2621 | * {@inheritdoc} |
||
| 2622 | */ |
||
| 2623 | public function getListModes() |
||
| 2627 | |||
| 2628 | /** |
||
| 2629 | * {@inheritdoc} |
||
| 2630 | */ |
||
| 2631 | public function setListMode($mode) |
||
| 2639 | |||
| 2640 | /** |
||
| 2641 | * {@inheritdoc} |
||
| 2642 | */ |
||
| 2643 | public function getListMode() |
||
| 2651 | |||
| 2652 | /** |
||
| 2653 | * {@inheritdoc} |
||
| 2654 | */ |
||
| 2655 | public function getAccessMapping() |
||
| 2659 | |||
| 2660 | /** |
||
| 2661 | * {@inheritdoc} |
||
| 2662 | */ |
||
| 2663 | public function checkAccess($action, $object = null) |
||
| 2685 | |||
| 2686 | /** |
||
| 2687 | * {@inheritdoc} |
||
| 2688 | */ |
||
| 2689 | public function hasAccess($action, $object = null) |
||
| 2709 | |||
| 2710 | /** |
||
| 2711 | * {@inheritdoc} |
||
| 2712 | */ |
||
| 2713 | final public function getActionButtons($action, $object = null) |
||
| 2781 | |||
| 2782 | /** |
||
| 2783 | * {@inheritdoc} |
||
| 2784 | */ |
||
| 2785 | public function getDashboardActions() |
||
| 2810 | |||
| 2811 | /** |
||
| 2812 | * {@inheritdoc} |
||
| 2813 | */ |
||
| 2814 | final public function showMosaicButton($isShown) |
||
| 2822 | |||
| 2823 | /** |
||
| 2824 | * {@inheritdoc} |
||
| 2825 | */ |
||
| 2826 | final public function getSearchResultLink($object) |
||
| 2836 | |||
| 2837 | /** |
||
| 2838 | * Checks if a filter type is set to a default value. |
||
| 2839 | * |
||
| 2840 | * @param string $name |
||
| 2841 | * |
||
| 2842 | * @return bool |
||
| 2843 | */ |
||
| 2844 | final public function isDefaultFilter($name) |
||
| 2855 | |||
| 2856 | /** |
||
| 2857 | * Check object existence and access, without throw Exception. |
||
| 2858 | * |
||
| 2859 | * @param string $action |
||
| 2860 | * @param object $object |
||
| 2861 | * |
||
| 2862 | * @return bool |
||
| 2863 | */ |
||
| 2864 | public function canAccessObject($action, $object) |
||
| 2868 | |||
| 2869 | /** |
||
| 2870 | * Hook to run after initilization. |
||
| 2871 | */ |
||
| 2872 | protected function configure() |
||
| 2875 | |||
| 2876 | /** |
||
| 2877 | * urlize the given word. |
||
| 2878 | * |
||
| 2879 | * @param string $word |
||
| 2880 | * @param string $sep the separator |
||
| 2881 | * |
||
| 2882 | * @return string |
||
| 2883 | */ |
||
| 2884 | final protected function urlize($word, $sep = '_') |
||
| 2888 | |||
| 2889 | /** |
||
| 2890 | * Returns a list of default filters. |
||
| 2891 | * |
||
| 2892 | * @return array |
||
| 2893 | */ |
||
| 2894 | final protected function getDefaultFilterValues() |
||
| 2909 | |||
| 2910 | /** |
||
| 2911 | * {@inheritdoc} |
||
| 2912 | */ |
||
| 2913 | protected function configureFormFields(FormMapper $form) |
||
| 2916 | |||
| 2917 | /** |
||
| 2918 | * @param ListMapper $list |
||
| 2919 | */ |
||
| 2920 | protected function configureListFields(ListMapper $list) |
||
| 2923 | |||
| 2924 | /** |
||
| 2925 | * @param DatagridMapper $filter |
||
| 2926 | */ |
||
| 2927 | protected function configureDatagridFilters(DatagridMapper $filter) |
||
| 2930 | |||
| 2931 | /** |
||
| 2932 | * @param ShowMapper $show |
||
| 2933 | */ |
||
| 2934 | protected function configureShowFields(ShowMapper $show) |
||
| 2937 | |||
| 2938 | /** |
||
| 2939 | * @param RouteCollection $collection |
||
| 2940 | */ |
||
| 2941 | protected function configureRoutes(RouteCollection $collection) |
||
| 2944 | |||
| 2945 | /** |
||
| 2946 | * Configure buttons for an action. |
||
| 2947 | * |
||
| 2948 | * @param array $buttonList List of all action buttons |
||
| 2949 | * @param string $action Current action route |
||
| 2950 | * @param object $object Current object |
||
| 2951 | * |
||
| 2952 | * @return array |
||
| 2953 | */ |
||
| 2954 | protected function configureActionButtons($buttonList, $action, $object = null) |
||
| 2958 | |||
| 2959 | /** |
||
| 2960 | * Allows you to customize batch actions. |
||
| 2961 | * |
||
| 2962 | * @param array $actions List of actions |
||
| 2963 | * |
||
| 2964 | * @return array |
||
| 2965 | */ |
||
| 2966 | protected function configureBatchActions($actions) |
||
| 2970 | |||
| 2971 | /** |
||
| 2972 | * NEXT_MAJOR: remove this method. |
||
| 2973 | * |
||
| 2974 | * @param MenuItemInterface $menu |
||
| 2975 | * @param $action |
||
| 2976 | * @param AdminInterface $childAdmin |
||
| 2977 | * |
||
| 2978 | * @return mixed |
||
| 2979 | * |
||
| 2980 | * @deprecated Use configureTabMenu instead |
||
| 2981 | */ |
||
| 2982 | protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInterface $childAdmin = null) |
||
| 2985 | |||
| 2986 | /** |
||
| 2987 | * Configures the tab menu in your admin. |
||
| 2988 | * |
||
| 2989 | * @param MenuItemInterface $menu |
||
| 2990 | * @param string $action |
||
| 2991 | * @param AdminInterface $childAdmin |
||
| 2992 | * |
||
| 2993 | * @return mixed |
||
| 2994 | */ |
||
| 2995 | protected function configureTabMenu(MenuItemInterface $menu, $action, AdminInterface $childAdmin = null) |
||
| 3001 | |||
| 3002 | /** |
||
| 3003 | * build the view FieldDescription array. |
||
| 3004 | */ |
||
| 3005 | protected function buildShow() |
||
| 3020 | |||
| 3021 | /** |
||
| 3022 | * build the list FieldDescription array. |
||
| 3023 | */ |
||
| 3024 | protected function buildList() |
||
| 3076 | |||
| 3077 | /** |
||
| 3078 | * Build the form FieldDescription collection. |
||
| 3079 | */ |
||
| 3080 | protected function buildForm() |
||
| 3108 | |||
| 3109 | /** |
||
| 3110 | * Gets the subclass corresponding to the given name. |
||
| 3111 | * |
||
| 3112 | * @param string $name The name of the sub class |
||
| 3113 | * |
||
| 3114 | * @return string the subclass |
||
| 3115 | */ |
||
| 3116 | protected function getSubClass($name) |
||
| 3128 | |||
| 3129 | /** |
||
| 3130 | * Attach the inline validator to the model metadata, this must be done once per admin. |
||
| 3131 | */ |
||
| 3132 | protected function attachInlineValidator() |
||
| 3164 | |||
| 3165 | /** |
||
| 3166 | * Predefine per page options. |
||
| 3167 | */ |
||
| 3168 | protected function predefinePerPageOptions() |
||
| 3174 | |||
| 3175 | /** |
||
| 3176 | * Return list routes with permissions name. |
||
| 3177 | * |
||
| 3178 | * @return array |
||
| 3179 | */ |
||
| 3180 | protected function getAccess() |
||
| 3202 | |||
| 3203 | /** |
||
| 3204 | * Returns a list of default filters. |
||
| 3205 | * |
||
| 3206 | * @param array $filterValues |
||
| 3207 | */ |
||
| 3208 | protected function configureDefaultFilterValues(array &$filterValues) |
||
| 3211 | |||
| 3212 | /** |
||
| 3213 | * {@inheritdoc} |
||
| 3214 | */ |
||
| 3215 | private function buildDatagrid() |
||
| 3267 | |||
| 3268 | /** |
||
| 3269 | * Build all the related urls to the current admin. |
||
| 3270 | */ |
||
| 3271 | private function buildRoutes() |
||
| 3294 | } |
||
| 3295 |
This check marks private properties in classes that are never used. Those properties can be removed.