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 |
||
| 53 | abstract class AbstractAdmin implements AdminInterface, DomainObjectInterface, AdminTreeInterface |
||
| 54 | { |
||
| 55 | const CONTEXT_MENU = 'menu'; |
||
| 56 | const CONTEXT_DASHBOARD = 'dashboard'; |
||
| 57 | |||
| 58 | const CLASS_REGEX = |
||
| 59 | '@ |
||
| 60 | (?:([A-Za-z0-9]*)\\\)? # vendor name / app name |
||
| 61 | (Bundle\\\)? # optional bundle directory |
||
| 62 | ([A-Za-z0-9]+?)(?:Bundle)?\\\ # bundle name, with optional suffix |
||
| 63 | ( |
||
| 64 | Entity|Document|Model|PHPCR|CouchDocument|Phpcr| |
||
| 65 | Doctrine\\\Orm|Doctrine\\\Phpcr|Doctrine\\\MongoDB|Doctrine\\\CouchDB |
||
| 66 | )\\\(.*)@x'; |
||
| 67 | |||
| 68 | const MOSAIC_ICON_CLASS = 'fa fa-th-large fa-fw'; |
||
| 69 | |||
| 70 | /** |
||
| 71 | * The list FieldDescription constructed from the configureListField method. |
||
| 72 | * |
||
| 73 | * @var array |
||
| 74 | */ |
||
| 75 | protected $listFieldDescriptions = array(); |
||
| 76 | |||
| 77 | /** |
||
| 78 | * The show FieldDescription constructed from the configureShowFields method. |
||
| 79 | * |
||
| 80 | * @var array |
||
| 81 | */ |
||
| 82 | protected $showFieldDescriptions = array(); |
||
| 83 | |||
| 84 | /** |
||
| 85 | * The list FieldDescription constructed from the configureFormField method. |
||
| 86 | * |
||
| 87 | * @var array |
||
| 88 | */ |
||
| 89 | protected $formFieldDescriptions = array(); |
||
| 90 | |||
| 91 | /** |
||
| 92 | * The filter FieldDescription constructed from the configureFilterField method. |
||
| 93 | * |
||
| 94 | * @var array |
||
| 95 | */ |
||
| 96 | protected $filterFieldDescriptions = array(); |
||
| 97 | |||
| 98 | /** |
||
| 99 | * The number of result to display in the list. |
||
| 100 | * |
||
| 101 | * @var int |
||
| 102 | */ |
||
| 103 | protected $maxPerPage = 32; |
||
| 104 | |||
| 105 | /** |
||
| 106 | * The maximum number of page numbers to display in the list. |
||
| 107 | * |
||
| 108 | * @var int |
||
| 109 | */ |
||
| 110 | protected $maxPageLinks = 25; |
||
| 111 | |||
| 112 | /** |
||
| 113 | * The base route name used to generate the routing information. |
||
| 114 | * |
||
| 115 | * @var string |
||
| 116 | */ |
||
| 117 | protected $baseRouteName; |
||
| 118 | |||
| 119 | /** |
||
| 120 | * The base route pattern used to generate the routing information. |
||
| 121 | * |
||
| 122 | * @var string |
||
| 123 | */ |
||
| 124 | protected $baseRoutePattern; |
||
| 125 | |||
| 126 | /** |
||
| 127 | * The base name controller used to generate the routing information. |
||
| 128 | * |
||
| 129 | * @var string |
||
| 130 | */ |
||
| 131 | protected $baseControllerName; |
||
| 132 | |||
| 133 | /** |
||
| 134 | * The label class name (used in the title/breadcrumb ...). |
||
| 135 | * |
||
| 136 | * @var string |
||
| 137 | */ |
||
| 138 | protected $classnameLabel; |
||
| 139 | |||
| 140 | /** |
||
| 141 | * The translation domain to be used to translate messages. |
||
| 142 | * |
||
| 143 | * @var string |
||
| 144 | */ |
||
| 145 | protected $translationDomain = 'messages'; |
||
| 146 | |||
| 147 | /** |
||
| 148 | * Options to set to the form (ie, validation_groups). |
||
| 149 | * |
||
| 150 | * @var array |
||
| 151 | */ |
||
| 152 | protected $formOptions = array(); |
||
| 153 | |||
| 154 | /** |
||
| 155 | * Default values to the datagrid. |
||
| 156 | * |
||
| 157 | * @var array |
||
| 158 | */ |
||
| 159 | protected $datagridValues = array( |
||
| 160 | '_page' => 1, |
||
| 161 | '_per_page' => 32, |
||
| 162 | ); |
||
| 163 | |||
| 164 | /** |
||
| 165 | * Predefined per page options. |
||
| 166 | * |
||
| 167 | * @var array |
||
| 168 | */ |
||
| 169 | protected $perPageOptions = array(16, 32, 64, 128, 192); |
||
| 170 | |||
| 171 | /** |
||
| 172 | * Pager type. |
||
| 173 | * |
||
| 174 | * @var string |
||
| 175 | */ |
||
| 176 | protected $pagerType = Pager::TYPE_DEFAULT; |
||
| 177 | |||
| 178 | /** |
||
| 179 | * The code related to the admin. |
||
| 180 | * |
||
| 181 | * @var string |
||
| 182 | */ |
||
| 183 | protected $code; |
||
| 184 | |||
| 185 | /** |
||
| 186 | * The label. |
||
| 187 | * |
||
| 188 | * @var string |
||
| 189 | */ |
||
| 190 | protected $label; |
||
| 191 | |||
| 192 | /** |
||
| 193 | * Whether or not to persist the filters in the session. |
||
| 194 | * |
||
| 195 | * @var bool |
||
| 196 | */ |
||
| 197 | protected $persistFilters = false; |
||
| 198 | |||
| 199 | /** |
||
| 200 | * Array of routes related to this admin. |
||
| 201 | * |
||
| 202 | * @var RouteCollection |
||
| 203 | */ |
||
| 204 | protected $routes; |
||
| 205 | |||
| 206 | /** |
||
| 207 | * The subject only set in edit/update/create mode. |
||
| 208 | * |
||
| 209 | * @var object |
||
| 210 | */ |
||
| 211 | protected $subject; |
||
| 212 | |||
| 213 | /** |
||
| 214 | * Define a Collection of child admin, ie /admin/order/{id}/order-element/{childId}. |
||
| 215 | * |
||
| 216 | * @var array |
||
| 217 | */ |
||
| 218 | protected $children = array(); |
||
| 219 | |||
| 220 | /** |
||
| 221 | * Reference the parent collection. |
||
| 222 | * |
||
| 223 | * @var AdminInterface|null |
||
| 224 | */ |
||
| 225 | protected $parent = null; |
||
| 226 | |||
| 227 | /** |
||
| 228 | * The related parent association, ie if OrderElement has a parent property named order, |
||
| 229 | * then the $parentAssociationMapping must be a string named `order`. |
||
| 230 | * |
||
| 231 | * @var string |
||
| 232 | */ |
||
| 233 | protected $parentAssociationMapping = null; |
||
| 234 | |||
| 235 | /** |
||
| 236 | * Reference the parent FieldDescription related to this admin |
||
| 237 | * only set for FieldDescription which is associated to an Sub Admin instance. |
||
| 238 | * |
||
| 239 | * @var FieldDescriptionInterface |
||
| 240 | */ |
||
| 241 | protected $parentFieldDescription; |
||
| 242 | |||
| 243 | /** |
||
| 244 | * If true then the current admin is part of the nested admin set (from the url). |
||
| 245 | * |
||
| 246 | * @var bool |
||
| 247 | */ |
||
| 248 | protected $currentChild = false; |
||
| 249 | |||
| 250 | /** |
||
| 251 | * The uniqid is used to avoid clashing with 2 admin related to the code |
||
| 252 | * ie: a Block linked to a Block. |
||
| 253 | * |
||
| 254 | * @var string |
||
| 255 | */ |
||
| 256 | protected $uniqid; |
||
| 257 | |||
| 258 | /** |
||
| 259 | * The Entity or Document manager. |
||
| 260 | * |
||
| 261 | * @var ModelManagerInterface |
||
| 262 | */ |
||
| 263 | protected $modelManager; |
||
| 264 | |||
| 265 | /** |
||
| 266 | * The current request object. |
||
| 267 | * |
||
| 268 | * @var \Symfony\Component\HttpFoundation\Request |
||
| 269 | */ |
||
| 270 | protected $request; |
||
| 271 | |||
| 272 | /** |
||
| 273 | * The translator component. |
||
| 274 | * |
||
| 275 | * NEXT_MAJOR: remove this property |
||
| 276 | * |
||
| 277 | * @var \Symfony\Component\Translation\TranslatorInterface |
||
| 278 | * |
||
| 279 | * @deprecated since 3.9, to be removed with 4.0 |
||
| 280 | */ |
||
| 281 | protected $translator; |
||
| 282 | |||
| 283 | /** |
||
| 284 | * The related form contractor. |
||
| 285 | * |
||
| 286 | * @var FormContractorInterface |
||
| 287 | */ |
||
| 288 | protected $formContractor; |
||
| 289 | |||
| 290 | /** |
||
| 291 | * The related list builder. |
||
| 292 | * |
||
| 293 | * @var ListBuilderInterface |
||
| 294 | */ |
||
| 295 | protected $listBuilder; |
||
| 296 | |||
| 297 | /** |
||
| 298 | * The related view builder. |
||
| 299 | * |
||
| 300 | * @var ShowBuilderInterface |
||
| 301 | */ |
||
| 302 | protected $showBuilder; |
||
| 303 | |||
| 304 | /** |
||
| 305 | * The related datagrid builder. |
||
| 306 | * |
||
| 307 | * @var DatagridBuilderInterface |
||
| 308 | */ |
||
| 309 | protected $datagridBuilder; |
||
| 310 | |||
| 311 | /** |
||
| 312 | * @var RouteBuilderInterface |
||
| 313 | */ |
||
| 314 | protected $routeBuilder; |
||
| 315 | |||
| 316 | /** |
||
| 317 | * The datagrid instance. |
||
| 318 | * |
||
| 319 | * @var \Sonata\AdminBundle\Datagrid\DatagridInterface |
||
| 320 | */ |
||
| 321 | protected $datagrid; |
||
| 322 | |||
| 323 | /** |
||
| 324 | * The router instance. |
||
| 325 | * |
||
| 326 | * @var RouteGeneratorInterface |
||
| 327 | */ |
||
| 328 | protected $routeGenerator; |
||
| 329 | |||
| 330 | /** |
||
| 331 | * @var SecurityHandlerInterface |
||
| 332 | */ |
||
| 333 | protected $securityHandler = null; |
||
| 334 | |||
| 335 | /** |
||
| 336 | * @var ValidatorInterface|LegacyValidatorInterface |
||
| 337 | */ |
||
| 338 | protected $validator = null; |
||
| 339 | |||
| 340 | /** |
||
| 341 | * The configuration pool. |
||
| 342 | * |
||
| 343 | * @var Pool |
||
| 344 | */ |
||
| 345 | protected $configurationPool; |
||
| 346 | |||
| 347 | /** |
||
| 348 | * @var MenuItemInterface |
||
| 349 | */ |
||
| 350 | protected $menu; |
||
| 351 | |||
| 352 | /** |
||
| 353 | * @var MenuFactoryInterface |
||
| 354 | */ |
||
| 355 | protected $menuFactory; |
||
| 356 | |||
| 357 | /** |
||
| 358 | * @var array |
||
| 359 | */ |
||
| 360 | protected $loaded = array( |
||
| 361 | 'view_fields' => false, |
||
| 362 | 'view_groups' => false, |
||
| 363 | 'routes' => false, |
||
| 364 | 'tab_menu' => false, |
||
| 365 | ); |
||
| 366 | |||
| 367 | /** |
||
| 368 | * @var array |
||
| 369 | */ |
||
| 370 | protected $formTheme = array(); |
||
| 371 | |||
| 372 | /** |
||
| 373 | * @var array |
||
| 374 | */ |
||
| 375 | protected $filterTheme = array(); |
||
| 376 | |||
| 377 | /** |
||
| 378 | * @var array |
||
| 379 | */ |
||
| 380 | protected $templates = array(); |
||
| 381 | |||
| 382 | /** |
||
| 383 | * @var AdminExtensionInterface[] |
||
| 384 | */ |
||
| 385 | protected $extensions = array(); |
||
| 386 | |||
| 387 | /** |
||
| 388 | * @var LabelTranslatorStrategyInterface |
||
| 389 | */ |
||
| 390 | protected $labelTranslatorStrategy; |
||
| 391 | |||
| 392 | /** |
||
| 393 | * Setting to true will enable preview mode for |
||
| 394 | * the entity and show a preview button in the |
||
| 395 | * edit/create forms. |
||
| 396 | * |
||
| 397 | * @var bool |
||
| 398 | */ |
||
| 399 | protected $supportsPreviewMode = false; |
||
| 400 | |||
| 401 | /** |
||
| 402 | * Roles and permissions per role. |
||
| 403 | * |
||
| 404 | * @var array [role] => array([permission], [permission]) |
||
| 405 | */ |
||
| 406 | protected $securityInformation = array(); |
||
| 407 | |||
| 408 | protected $cacheIsGranted = array(); |
||
| 409 | |||
| 410 | /** |
||
| 411 | * Action list for the search result. |
||
| 412 | * |
||
| 413 | * @var string[] |
||
| 414 | */ |
||
| 415 | protected $searchResultActions = array('edit', 'show'); |
||
| 416 | |||
| 417 | protected $listModes = array( |
||
| 418 | 'list' => array( |
||
| 419 | 'class' => 'fa fa-list fa-fw', |
||
| 420 | ), |
||
| 421 | 'mosaic' => array( |
||
| 422 | 'class' => self::MOSAIC_ICON_CLASS, |
||
| 423 | ), |
||
| 424 | ); |
||
| 425 | |||
| 426 | /** |
||
| 427 | * The Access mapping. |
||
| 428 | * |
||
| 429 | * @var array [action1 => requiredRole1, action2 => [requiredRole2, requiredRole3]] |
||
| 430 | */ |
||
| 431 | protected $accessMapping = array(); |
||
| 432 | |||
| 433 | /** |
||
| 434 | * The class name managed by the admin class. |
||
| 435 | * |
||
| 436 | * @var string |
||
| 437 | */ |
||
| 438 | private $class; |
||
| 439 | |||
| 440 | /** |
||
| 441 | * The subclasses supported by the admin class. |
||
| 442 | * |
||
| 443 | * @var array |
||
| 444 | */ |
||
| 445 | private $subClasses = array(); |
||
| 446 | |||
| 447 | /** |
||
| 448 | * The list collection. |
||
| 449 | * |
||
| 450 | * @var array |
||
| 451 | */ |
||
| 452 | private $list; |
||
| 453 | |||
| 454 | /** |
||
| 455 | * @var FieldDescriptionCollection |
||
| 456 | */ |
||
| 457 | private $show; |
||
| 458 | |||
| 459 | /** |
||
| 460 | * @var Form |
||
| 461 | */ |
||
| 462 | private $form; |
||
| 463 | |||
| 464 | /** |
||
| 465 | * @var DatagridInterface |
||
| 466 | */ |
||
| 467 | private $filter; |
||
|
|
|||
| 468 | |||
| 469 | /** |
||
| 470 | * The cached base route name. |
||
| 471 | * |
||
| 472 | * @var string |
||
| 473 | */ |
||
| 474 | private $cachedBaseRouteName; |
||
| 475 | |||
| 476 | /** |
||
| 477 | * The cached base route pattern. |
||
| 478 | * |
||
| 479 | * @var string |
||
| 480 | */ |
||
| 481 | private $cachedBaseRoutePattern; |
||
| 482 | |||
| 483 | /** |
||
| 484 | * The form group disposition. |
||
| 485 | * |
||
| 486 | * @var array|bool |
||
| 487 | */ |
||
| 488 | private $formGroups = false; |
||
| 489 | |||
| 490 | /** |
||
| 491 | * The form tabs disposition. |
||
| 492 | * |
||
| 493 | * @var array|bool |
||
| 494 | */ |
||
| 495 | private $formTabs = false; |
||
| 496 | |||
| 497 | /** |
||
| 498 | * The view group disposition. |
||
| 499 | * |
||
| 500 | * @var array|bool |
||
| 501 | */ |
||
| 502 | private $showGroups = false; |
||
| 503 | |||
| 504 | /** |
||
| 505 | * The view tab disposition. |
||
| 506 | * |
||
| 507 | * @var array|bool |
||
| 508 | */ |
||
| 509 | private $showTabs = false; |
||
| 510 | |||
| 511 | /** |
||
| 512 | * The manager type to use for the admin. |
||
| 513 | * |
||
| 514 | * @var string |
||
| 515 | */ |
||
| 516 | private $managerType; |
||
| 517 | |||
| 518 | /** |
||
| 519 | * @param string $code |
||
| 520 | * @param string $class |
||
| 521 | * @param string $baseControllerName |
||
| 522 | */ |
||
| 523 | public function __construct($code, $class, $baseControllerName) |
||
| 532 | |||
| 533 | /** |
||
| 534 | * {@inheritdoc} |
||
| 535 | * |
||
| 536 | * NEXT_MAJOR: return null to indicate no override |
||
| 537 | */ |
||
| 538 | public function getExportFormats() |
||
| 544 | |||
| 545 | /** |
||
| 546 | * {@inheritdoc} |
||
| 547 | */ |
||
| 548 | public function getExportFields() |
||
| 560 | |||
| 561 | /** |
||
| 562 | * {@inheritdoc} |
||
| 563 | */ |
||
| 564 | public function getDataSourceIterator() |
||
| 586 | |||
| 587 | /** |
||
| 588 | * {@inheritdoc} |
||
| 589 | */ |
||
| 590 | public function validate(ErrorElement $errorElement, $object) |
||
| 593 | |||
| 594 | /** |
||
| 595 | * define custom variable. |
||
| 596 | */ |
||
| 597 | public function initialize() |
||
| 605 | |||
| 606 | /** |
||
| 607 | * {@inheritdoc} |
||
| 608 | */ |
||
| 609 | public function update($object) |
||
| 629 | |||
| 630 | /** |
||
| 631 | * {@inheritdoc} |
||
| 632 | */ |
||
| 633 | public function create($object) |
||
| 655 | |||
| 656 | /** |
||
| 657 | * {@inheritdoc} |
||
| 658 | */ |
||
| 659 | public function delete($object) |
||
| 674 | |||
| 675 | /** |
||
| 676 | * {@inheritdoc} |
||
| 677 | */ |
||
| 678 | public function preValidate($object) |
||
| 681 | |||
| 682 | /** |
||
| 683 | * {@inheritdoc} |
||
| 684 | */ |
||
| 685 | public function preUpdate($object) |
||
| 688 | |||
| 689 | /** |
||
| 690 | * {@inheritdoc} |
||
| 691 | */ |
||
| 692 | public function postUpdate($object) |
||
| 695 | |||
| 696 | /** |
||
| 697 | * {@inheritdoc} |
||
| 698 | */ |
||
| 699 | public function prePersist($object) |
||
| 702 | |||
| 703 | /** |
||
| 704 | * {@inheritdoc} |
||
| 705 | */ |
||
| 706 | public function postPersist($object) |
||
| 709 | |||
| 710 | /** |
||
| 711 | * {@inheritdoc} |
||
| 712 | */ |
||
| 713 | public function preRemove($object) |
||
| 716 | |||
| 717 | /** |
||
| 718 | * {@inheritdoc} |
||
| 719 | */ |
||
| 720 | public function postRemove($object) |
||
| 723 | |||
| 724 | /** |
||
| 725 | * {@inheritdoc} |
||
| 726 | */ |
||
| 727 | public function preBatchAction($actionName, ProxyQueryInterface $query, array &$idx, $allElements) |
||
| 730 | |||
| 731 | /** |
||
| 732 | * {@inheritdoc} |
||
| 733 | */ |
||
| 734 | public function getFilterParameters() |
||
| 771 | |||
| 772 | /** |
||
| 773 | * Returns the name of the parent related field, so the field can be use to set the default |
||
| 774 | * value (ie the parent object) or to filter the object. |
||
| 775 | * |
||
| 776 | * @return string the name of the parent related field |
||
| 777 | */ |
||
| 778 | public function getParentAssociationMapping() |
||
| 782 | |||
| 783 | /** |
||
| 784 | * Returns the baseRoutePattern used to generate the routing information. |
||
| 785 | * |
||
| 786 | * @throws \RuntimeException |
||
| 787 | * |
||
| 788 | * @return string the baseRoutePattern used to generate the routing information |
||
| 789 | */ |
||
| 790 | public function getBaseRoutePattern() |
||
| 828 | |||
| 829 | /** |
||
| 830 | * Returns the baseRouteName used to generate the routing information. |
||
| 831 | * |
||
| 832 | * @throws \RuntimeException |
||
| 833 | * |
||
| 834 | * @return string the baseRouteName used to generate the routing information |
||
| 835 | */ |
||
| 836 | public function getBaseRouteName() |
||
| 873 | |||
| 874 | /** |
||
| 875 | * {@inheritdoc} |
||
| 876 | */ |
||
| 877 | public function getClass() |
||
| 904 | |||
| 905 | /** |
||
| 906 | * {@inheritdoc} |
||
| 907 | */ |
||
| 908 | public function getSubClasses() |
||
| 912 | |||
| 913 | /** |
||
| 914 | * {@inheritdoc} |
||
| 915 | */ |
||
| 916 | public function addSubClass($subClass) |
||
| 922 | |||
| 923 | /** |
||
| 924 | * {@inheritdoc} |
||
| 925 | */ |
||
| 926 | public function setSubClasses(array $subClasses) |
||
| 930 | |||
| 931 | /** |
||
| 932 | * {@inheritdoc} |
||
| 933 | */ |
||
| 934 | public function hasSubClass($name) |
||
| 938 | |||
| 939 | /** |
||
| 940 | * {@inheritdoc} |
||
| 941 | */ |
||
| 942 | public function hasActiveSubClass() |
||
| 950 | |||
| 951 | /** |
||
| 952 | * {@inheritdoc} |
||
| 953 | */ |
||
| 954 | public function getActiveSubClass() |
||
| 962 | |||
| 963 | /** |
||
| 964 | * {@inheritdoc} |
||
| 965 | */ |
||
| 966 | public function getActiveSubclassCode() |
||
| 980 | |||
| 981 | /** |
||
| 982 | * {@inheritdoc} |
||
| 983 | */ |
||
| 984 | final public function getBatchActions() |
||
| 1014 | |||
| 1015 | /** |
||
| 1016 | * {@inheritdoc} |
||
| 1017 | */ |
||
| 1018 | public function getRoutes() |
||
| 1024 | |||
| 1025 | /** |
||
| 1026 | * {@inheritdoc} |
||
| 1027 | */ |
||
| 1028 | public function getRouterIdParameter() |
||
| 1032 | |||
| 1033 | /** |
||
| 1034 | * {@inheritdoc} |
||
| 1035 | */ |
||
| 1036 | public function getIdParameter() |
||
| 1046 | |||
| 1047 | /** |
||
| 1048 | * {@inheritdoc} |
||
| 1049 | */ |
||
| 1050 | public function hasRoute($name) |
||
| 1058 | |||
| 1059 | /** |
||
| 1060 | * {@inheritdoc} |
||
| 1061 | */ |
||
| 1062 | public function isCurrentRoute($name, $adminCode = null) |
||
| 1083 | |||
| 1084 | /** |
||
| 1085 | * {@inheritdoc} |
||
| 1086 | */ |
||
| 1087 | public function generateObjectUrl($name, $object, array $parameters = array(), $absolute = RoutingUrlGeneratorInterface::ABSOLUTE_PATH) |
||
| 1093 | |||
| 1094 | /** |
||
| 1095 | * {@inheritdoc} |
||
| 1096 | */ |
||
| 1097 | public function generateUrl($name, array $parameters = array(), $absolute = RoutingUrlGeneratorInterface::ABSOLUTE_PATH) |
||
| 1101 | |||
| 1102 | /** |
||
| 1103 | * {@inheritdoc} |
||
| 1104 | */ |
||
| 1105 | public function generateMenuUrl($name, array $parameters = array(), $absolute = RoutingUrlGeneratorInterface::ABSOLUTE_PATH) |
||
| 1109 | |||
| 1110 | /** |
||
| 1111 | * {@inheritdoc} |
||
| 1112 | */ |
||
| 1113 | public function setTemplates(array $templates) |
||
| 1117 | |||
| 1118 | /** |
||
| 1119 | * {@inheritdoc} |
||
| 1120 | */ |
||
| 1121 | public function setTemplate($name, $template) |
||
| 1125 | |||
| 1126 | /** |
||
| 1127 | * {@inheritdoc} |
||
| 1128 | */ |
||
| 1129 | public function getTemplates() |
||
| 1133 | |||
| 1134 | /** |
||
| 1135 | * {@inheritdoc} |
||
| 1136 | */ |
||
| 1137 | public function getTemplate($name) |
||
| 1143 | |||
| 1144 | /** |
||
| 1145 | * {@inheritdoc} |
||
| 1146 | */ |
||
| 1147 | public function getNewInstance() |
||
| 1156 | |||
| 1157 | /** |
||
| 1158 | * {@inheritdoc} |
||
| 1159 | */ |
||
| 1160 | public function getFormBuilder() |
||
| 1173 | |||
| 1174 | /** |
||
| 1175 | * This method is being called by the main admin class and the child class, |
||
| 1176 | * the getFormBuilder is only call by the main admin class. |
||
| 1177 | * |
||
| 1178 | * @param FormBuilderInterface $formBuilder |
||
| 1179 | */ |
||
| 1180 | public function defineFormBuilder(FormBuilderInterface $formBuilder) |
||
| 1192 | |||
| 1193 | /** |
||
| 1194 | * {@inheritdoc} |
||
| 1195 | */ |
||
| 1196 | public function attachAdminClass(FieldDescriptionInterface $fieldDescription) |
||
| 1218 | |||
| 1219 | /** |
||
| 1220 | * {@inheritdoc} |
||
| 1221 | */ |
||
| 1222 | public function getObject($id) |
||
| 1231 | |||
| 1232 | /** |
||
| 1233 | * {@inheritdoc} |
||
| 1234 | */ |
||
| 1235 | public function getForm() |
||
| 1241 | |||
| 1242 | /** |
||
| 1243 | * {@inheritdoc} |
||
| 1244 | */ |
||
| 1245 | public function getList() |
||
| 1251 | |||
| 1252 | /** |
||
| 1253 | * {@inheritdoc} |
||
| 1254 | */ |
||
| 1255 | public function createQuery($context = 'list') |
||
| 1271 | |||
| 1272 | /** |
||
| 1273 | * {@inheritdoc} |
||
| 1274 | */ |
||
| 1275 | public function getDatagrid() |
||
| 1281 | |||
| 1282 | /** |
||
| 1283 | * {@inheritdoc} |
||
| 1284 | */ |
||
| 1285 | public function buildTabMenu($action, AdminInterface $childAdmin = null) |
||
| 1310 | |||
| 1311 | /** |
||
| 1312 | * @param string $action |
||
| 1313 | * @param AdminInterface $childAdmin |
||
| 1314 | * |
||
| 1315 | * @return ItemInterface |
||
| 1316 | */ |
||
| 1317 | public function getSideMenu($action, AdminInterface $childAdmin = null) |
||
| 1327 | |||
| 1328 | /** |
||
| 1329 | * Returns the root code. |
||
| 1330 | * |
||
| 1331 | * @return string the root code |
||
| 1332 | */ |
||
| 1333 | public function getRootCode() |
||
| 1337 | |||
| 1338 | /** |
||
| 1339 | * Returns the master admin. |
||
| 1340 | * |
||
| 1341 | * @return AbstractAdmin the root admin class |
||
| 1342 | */ |
||
| 1343 | public function getRoot() |
||
| 1353 | |||
| 1354 | /** |
||
| 1355 | * {@inheritdoc} |
||
| 1356 | */ |
||
| 1357 | public function setBaseControllerName($baseControllerName) |
||
| 1361 | |||
| 1362 | /** |
||
| 1363 | * {@inheritdoc} |
||
| 1364 | */ |
||
| 1365 | public function getBaseControllerName() |
||
| 1369 | |||
| 1370 | /** |
||
| 1371 | * @param string $label |
||
| 1372 | */ |
||
| 1373 | public function setLabel($label) |
||
| 1377 | |||
| 1378 | /** |
||
| 1379 | * {@inheritdoc} |
||
| 1380 | */ |
||
| 1381 | public function getLabel() |
||
| 1385 | |||
| 1386 | /** |
||
| 1387 | * @param bool $persist |
||
| 1388 | */ |
||
| 1389 | public function setPersistFilters($persist) |
||
| 1393 | |||
| 1394 | /** |
||
| 1395 | * @param int $maxPerPage |
||
| 1396 | */ |
||
| 1397 | public function setMaxPerPage($maxPerPage) |
||
| 1401 | |||
| 1402 | /** |
||
| 1403 | * @return int |
||
| 1404 | */ |
||
| 1405 | public function getMaxPerPage() |
||
| 1409 | |||
| 1410 | /** |
||
| 1411 | * @param int $maxPageLinks |
||
| 1412 | */ |
||
| 1413 | public function setMaxPageLinks($maxPageLinks) |
||
| 1417 | |||
| 1418 | /** |
||
| 1419 | * @return int |
||
| 1420 | */ |
||
| 1421 | public function getMaxPageLinks() |
||
| 1425 | |||
| 1426 | /** |
||
| 1427 | * {@inheritdoc} |
||
| 1428 | */ |
||
| 1429 | public function getFormGroups() |
||
| 1433 | |||
| 1434 | /** |
||
| 1435 | * {@inheritdoc} |
||
| 1436 | */ |
||
| 1437 | public function setFormGroups(array $formGroups) |
||
| 1441 | |||
| 1442 | /** |
||
| 1443 | * {@inheritdoc} |
||
| 1444 | */ |
||
| 1445 | public function removeFieldFromFormGroup($key) |
||
| 1455 | |||
| 1456 | /** |
||
| 1457 | * @param array $group |
||
| 1458 | * @param array $keys |
||
| 1459 | */ |
||
| 1460 | public function reorderFormGroup($group, array $keys) |
||
| 1466 | |||
| 1467 | /** |
||
| 1468 | * {@inheritdoc} |
||
| 1469 | */ |
||
| 1470 | public function getFormTabs() |
||
| 1474 | |||
| 1475 | /** |
||
| 1476 | * {@inheritdoc} |
||
| 1477 | */ |
||
| 1478 | public function setFormTabs(array $formTabs) |
||
| 1482 | |||
| 1483 | /** |
||
| 1484 | * {@inheritdoc} |
||
| 1485 | */ |
||
| 1486 | public function getShowTabs() |
||
| 1490 | |||
| 1491 | /** |
||
| 1492 | * {@inheritdoc} |
||
| 1493 | */ |
||
| 1494 | public function setShowTabs(array $showTabs) |
||
| 1498 | |||
| 1499 | /** |
||
| 1500 | * {@inheritdoc} |
||
| 1501 | */ |
||
| 1502 | public function getShowGroups() |
||
| 1506 | |||
| 1507 | /** |
||
| 1508 | * {@inheritdoc} |
||
| 1509 | */ |
||
| 1510 | public function setShowGroups(array $showGroups) |
||
| 1514 | |||
| 1515 | /** |
||
| 1516 | * {@inheritdoc} |
||
| 1517 | */ |
||
| 1518 | public function reorderShowGroup($group, array $keys) |
||
| 1524 | |||
| 1525 | /** |
||
| 1526 | * {@inheritdoc} |
||
| 1527 | */ |
||
| 1528 | public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription) |
||
| 1532 | |||
| 1533 | /** |
||
| 1534 | * {@inheritdoc} |
||
| 1535 | */ |
||
| 1536 | public function getParentFieldDescription() |
||
| 1540 | |||
| 1541 | /** |
||
| 1542 | * {@inheritdoc} |
||
| 1543 | */ |
||
| 1544 | public function hasParentFieldDescription() |
||
| 1548 | |||
| 1549 | /** |
||
| 1550 | * {@inheritdoc} |
||
| 1551 | */ |
||
| 1552 | public function setSubject($subject) |
||
| 1569 | |||
| 1570 | /** |
||
| 1571 | * {@inheritdoc} |
||
| 1572 | */ |
||
| 1573 | public function getSubject() |
||
| 1582 | |||
| 1583 | /** |
||
| 1584 | * {@inheritdoc} |
||
| 1585 | */ |
||
| 1586 | public function hasSubject() |
||
| 1590 | |||
| 1591 | /** |
||
| 1592 | * {@inheritdoc} |
||
| 1593 | */ |
||
| 1594 | public function getFormFieldDescriptions() |
||
| 1600 | |||
| 1601 | /** |
||
| 1602 | * {@inheritdoc} |
||
| 1603 | */ |
||
| 1604 | public function getFormFieldDescription($name) |
||
| 1608 | |||
| 1609 | /** |
||
| 1610 | * Returns true if the admin has a FieldDescription with the given $name. |
||
| 1611 | * |
||
| 1612 | * @param string $name |
||
| 1613 | * |
||
| 1614 | * @return bool |
||
| 1615 | */ |
||
| 1616 | public function hasFormFieldDescription($name) |
||
| 1620 | |||
| 1621 | /** |
||
| 1622 | * {@inheritdoc} |
||
| 1623 | */ |
||
| 1624 | public function addFormFieldDescription($name, FieldDescriptionInterface $fieldDescription) |
||
| 1628 | |||
| 1629 | /** |
||
| 1630 | * remove a FieldDescription. |
||
| 1631 | * |
||
| 1632 | * @param string $name |
||
| 1633 | */ |
||
| 1634 | public function removeFormFieldDescription($name) |
||
| 1638 | |||
| 1639 | /** |
||
| 1640 | * build and return the collection of form FieldDescription. |
||
| 1641 | * |
||
| 1642 | * @return array collection of form FieldDescription |
||
| 1643 | */ |
||
| 1644 | public function getShowFieldDescriptions() |
||
| 1650 | |||
| 1651 | /** |
||
| 1652 | * Returns the form FieldDescription with the given $name. |
||
| 1653 | * |
||
| 1654 | * @param string $name |
||
| 1655 | * |
||
| 1656 | * @return FieldDescriptionInterface |
||
| 1657 | */ |
||
| 1658 | public function getShowFieldDescription($name) |
||
| 1664 | |||
| 1665 | /** |
||
| 1666 | * {@inheritdoc} |
||
| 1667 | */ |
||
| 1668 | public function hasShowFieldDescription($name) |
||
| 1672 | |||
| 1673 | /** |
||
| 1674 | * {@inheritdoc} |
||
| 1675 | */ |
||
| 1676 | public function addShowFieldDescription($name, FieldDescriptionInterface $fieldDescription) |
||
| 1680 | |||
| 1681 | /** |
||
| 1682 | * {@inheritdoc} |
||
| 1683 | */ |
||
| 1684 | public function removeShowFieldDescription($name) |
||
| 1688 | |||
| 1689 | /** |
||
| 1690 | * {@inheritdoc} |
||
| 1691 | */ |
||
| 1692 | public function getListFieldDescriptions() |
||
| 1698 | |||
| 1699 | /** |
||
| 1700 | * {@inheritdoc} |
||
| 1701 | */ |
||
| 1702 | public function getListFieldDescription($name) |
||
| 1706 | |||
| 1707 | /** |
||
| 1708 | * {@inheritdoc} |
||
| 1709 | */ |
||
| 1710 | public function hasListFieldDescription($name) |
||
| 1716 | |||
| 1717 | /** |
||
| 1718 | * {@inheritdoc} |
||
| 1719 | */ |
||
| 1720 | public function addListFieldDescription($name, FieldDescriptionInterface $fieldDescription) |
||
| 1724 | |||
| 1725 | /** |
||
| 1726 | * {@inheritdoc} |
||
| 1727 | */ |
||
| 1728 | public function removeListFieldDescription($name) |
||
| 1732 | |||
| 1733 | /** |
||
| 1734 | * {@inheritdoc} |
||
| 1735 | */ |
||
| 1736 | public function getFilterFieldDescription($name) |
||
| 1740 | |||
| 1741 | /** |
||
| 1742 | * {@inheritdoc} |
||
| 1743 | */ |
||
| 1744 | public function hasFilterFieldDescription($name) |
||
| 1748 | |||
| 1749 | /** |
||
| 1750 | * {@inheritdoc} |
||
| 1751 | */ |
||
| 1752 | public function addFilterFieldDescription($name, FieldDescriptionInterface $fieldDescription) |
||
| 1756 | |||
| 1757 | /** |
||
| 1758 | * {@inheritdoc} |
||
| 1759 | */ |
||
| 1760 | public function removeFilterFieldDescription($name) |
||
| 1764 | |||
| 1765 | /** |
||
| 1766 | * {@inheritdoc} |
||
| 1767 | */ |
||
| 1768 | public function getFilterFieldDescriptions() |
||
| 1774 | |||
| 1775 | /** |
||
| 1776 | * {@inheritdoc} |
||
| 1777 | */ |
||
| 1778 | public function addChild(AdminInterface $child) |
||
| 1795 | |||
| 1796 | /** |
||
| 1797 | * {@inheritdoc} |
||
| 1798 | */ |
||
| 1799 | public function hasChild($code) |
||
| 1803 | |||
| 1804 | /** |
||
| 1805 | * {@inheritdoc} |
||
| 1806 | */ |
||
| 1807 | public function getChildren() |
||
| 1811 | |||
| 1812 | /** |
||
| 1813 | * {@inheritdoc} |
||
| 1814 | */ |
||
| 1815 | public function getChild($code) |
||
| 1819 | |||
| 1820 | /** |
||
| 1821 | * {@inheritdoc} |
||
| 1822 | */ |
||
| 1823 | public function setParent(AdminInterface $parent) |
||
| 1827 | |||
| 1828 | /** |
||
| 1829 | * {@inheritdoc} |
||
| 1830 | */ |
||
| 1831 | public function getParent() |
||
| 1835 | |||
| 1836 | /** |
||
| 1837 | * {@inheritdoc} |
||
| 1838 | */ |
||
| 1839 | final public function getRootAncestor() |
||
| 1849 | |||
| 1850 | /** |
||
| 1851 | * {@inheritdoc} |
||
| 1852 | */ |
||
| 1853 | final public function getChildDepth() |
||
| 1865 | |||
| 1866 | /** |
||
| 1867 | * {@inheritdoc} |
||
| 1868 | */ |
||
| 1869 | final public function getCurrentLeafChildAdmin() |
||
| 1883 | |||
| 1884 | /** |
||
| 1885 | * {@inheritdoc} |
||
| 1886 | */ |
||
| 1887 | public function isChild() |
||
| 1891 | |||
| 1892 | /** |
||
| 1893 | * Returns true if the admin has children, false otherwise. |
||
| 1894 | * |
||
| 1895 | * @return bool if the admin has children |
||
| 1896 | */ |
||
| 1897 | public function hasChildren() |
||
| 1901 | |||
| 1902 | /** |
||
| 1903 | * {@inheritdoc} |
||
| 1904 | */ |
||
| 1905 | public function setUniqid($uniqid) |
||
| 1909 | |||
| 1910 | /** |
||
| 1911 | * {@inheritdoc} |
||
| 1912 | */ |
||
| 1913 | public function getUniqid() |
||
| 1921 | |||
| 1922 | /** |
||
| 1923 | * {@inheritdoc} |
||
| 1924 | */ |
||
| 1925 | public function getClassnameLabel() |
||
| 1929 | |||
| 1930 | /** |
||
| 1931 | * {@inheritdoc} |
||
| 1932 | */ |
||
| 1933 | public function getPersistentParameters() |
||
| 1949 | |||
| 1950 | /** |
||
| 1951 | * {@inheritdoc} |
||
| 1952 | */ |
||
| 1953 | public function getPersistentParameter($name) |
||
| 1959 | |||
| 1960 | /** |
||
| 1961 | * {@inheritdoc} |
||
| 1962 | */ |
||
| 1963 | public function setCurrentChild($currentChild) |
||
| 1967 | |||
| 1968 | /** |
||
| 1969 | * {@inheritdoc} |
||
| 1970 | */ |
||
| 1971 | public function getCurrentChild() |
||
| 1975 | |||
| 1976 | /** |
||
| 1977 | * Returns the current child admin instance. |
||
| 1978 | * |
||
| 1979 | * @return AdminInterface|null the current child admin instance |
||
| 1980 | */ |
||
| 1981 | public function getCurrentChildAdmin() |
||
| 1991 | |||
| 1992 | /** |
||
| 1993 | * {@inheritdoc} |
||
| 1994 | */ |
||
| 1995 | public function trans($id, array $parameters = array(), $domain = null, $locale = null) |
||
| 2006 | |||
| 2007 | /** |
||
| 2008 | * Translate a message id. |
||
| 2009 | * |
||
| 2010 | * NEXT_MAJOR: remove this method |
||
| 2011 | * |
||
| 2012 | * @param string $id |
||
| 2013 | * @param int $count |
||
| 2014 | * @param array $parameters |
||
| 2015 | * @param string|null $domain |
||
| 2016 | * @param string|null $locale |
||
| 2017 | * |
||
| 2018 | * @return string the translated string |
||
| 2019 | * |
||
| 2020 | * @deprecated since 3.9, to be removed with 4.0 |
||
| 2021 | */ |
||
| 2022 | public function transChoice($id, $count, array $parameters = array(), $domain = null, $locale = null) |
||
| 2033 | |||
| 2034 | /** |
||
| 2035 | * {@inheritdoc} |
||
| 2036 | */ |
||
| 2037 | public function setTranslationDomain($translationDomain) |
||
| 2041 | |||
| 2042 | /** |
||
| 2043 | * {@inheritdoc} |
||
| 2044 | */ |
||
| 2045 | public function getTranslationDomain() |
||
| 2049 | |||
| 2050 | /** |
||
| 2051 | * {@inheritdoc} |
||
| 2052 | * |
||
| 2053 | * NEXT_MAJOR: remove this method |
||
| 2054 | * |
||
| 2055 | * @deprecated since 3.9, to be removed with 4.0 |
||
| 2056 | */ |
||
| 2057 | public function setTranslator(TranslatorInterface $translator) |
||
| 2069 | |||
| 2070 | /** |
||
| 2071 | * {@inheritdoc} |
||
| 2072 | * |
||
| 2073 | * NEXT_MAJOR: remove this method |
||
| 2074 | * |
||
| 2075 | * @deprecated since 3.9, to be removed with 4.0 |
||
| 2076 | */ |
||
| 2077 | public function getTranslator() |
||
| 2086 | |||
| 2087 | /** |
||
| 2088 | * {@inheritdoc} |
||
| 2089 | */ |
||
| 2090 | public function getTranslationLabel($label, $context = '', $type = '') |
||
| 2094 | |||
| 2095 | /** |
||
| 2096 | * {@inheritdoc} |
||
| 2097 | */ |
||
| 2098 | public function setRequest(Request $request) |
||
| 2106 | |||
| 2107 | /** |
||
| 2108 | * {@inheritdoc} |
||
| 2109 | */ |
||
| 2110 | public function getRequest() |
||
| 2118 | |||
| 2119 | /** |
||
| 2120 | * {@inheritdoc} |
||
| 2121 | */ |
||
| 2122 | public function hasRequest() |
||
| 2126 | |||
| 2127 | /** |
||
| 2128 | * {@inheritdoc} |
||
| 2129 | */ |
||
| 2130 | public function setFormContractor(FormContractorInterface $formBuilder) |
||
| 2134 | |||
| 2135 | /** |
||
| 2136 | * @return FormContractorInterface |
||
| 2137 | */ |
||
| 2138 | public function getFormContractor() |
||
| 2142 | |||
| 2143 | /** |
||
| 2144 | * {@inheritdoc} |
||
| 2145 | */ |
||
| 2146 | public function setDatagridBuilder(DatagridBuilderInterface $datagridBuilder) |
||
| 2150 | |||
| 2151 | /** |
||
| 2152 | * {@inheritdoc} |
||
| 2153 | */ |
||
| 2154 | public function getDatagridBuilder() |
||
| 2158 | |||
| 2159 | /** |
||
| 2160 | * {@inheritdoc} |
||
| 2161 | */ |
||
| 2162 | public function setListBuilder(ListBuilderInterface $listBuilder) |
||
| 2166 | |||
| 2167 | /** |
||
| 2168 | * {@inheritdoc} |
||
| 2169 | */ |
||
| 2170 | public function getListBuilder() |
||
| 2174 | |||
| 2175 | /** |
||
| 2176 | * @param ShowBuilderInterface $showBuilder |
||
| 2177 | */ |
||
| 2178 | public function setShowBuilder(ShowBuilderInterface $showBuilder) |
||
| 2182 | |||
| 2183 | /** |
||
| 2184 | * @return ShowBuilderInterface |
||
| 2185 | */ |
||
| 2186 | public function getShowBuilder() |
||
| 2190 | |||
| 2191 | /** |
||
| 2192 | * {@inheritdoc} |
||
| 2193 | */ |
||
| 2194 | public function setConfigurationPool(Pool $configurationPool) |
||
| 2198 | |||
| 2199 | /** |
||
| 2200 | * @return Pool |
||
| 2201 | */ |
||
| 2202 | public function getConfigurationPool() |
||
| 2206 | |||
| 2207 | /** |
||
| 2208 | * {@inheritdoc} |
||
| 2209 | */ |
||
| 2210 | public function setRouteGenerator(RouteGeneratorInterface $routeGenerator) |
||
| 2214 | |||
| 2215 | /** |
||
| 2216 | * @return RouteGeneratorInterface |
||
| 2217 | */ |
||
| 2218 | public function getRouteGenerator() |
||
| 2222 | |||
| 2223 | /** |
||
| 2224 | * {@inheritdoc} |
||
| 2225 | */ |
||
| 2226 | public function getCode() |
||
| 2230 | |||
| 2231 | /** |
||
| 2232 | * {@inheritdoc} |
||
| 2233 | */ |
||
| 2234 | public function getBaseCodeRoute() |
||
| 2242 | |||
| 2243 | /** |
||
| 2244 | * {@inheritdoc} |
||
| 2245 | */ |
||
| 2246 | public function getModelManager() |
||
| 2250 | |||
| 2251 | /** |
||
| 2252 | * @param ModelManagerInterface $modelManager |
||
| 2253 | */ |
||
| 2254 | public function setModelManager(ModelManagerInterface $modelManager) |
||
| 2258 | |||
| 2259 | /** |
||
| 2260 | * {@inheritdoc} |
||
| 2261 | */ |
||
| 2262 | public function getManagerType() |
||
| 2266 | |||
| 2267 | /** |
||
| 2268 | * @param string $type |
||
| 2269 | */ |
||
| 2270 | public function setManagerType($type) |
||
| 2274 | |||
| 2275 | /** |
||
| 2276 | * {@inheritdoc} |
||
| 2277 | */ |
||
| 2278 | public function getObjectIdentifier() |
||
| 2282 | |||
| 2283 | /** |
||
| 2284 | * Set the roles and permissions per role. |
||
| 2285 | * |
||
| 2286 | * @param array $information |
||
| 2287 | */ |
||
| 2288 | public function setSecurityInformation(array $information) |
||
| 2292 | |||
| 2293 | /** |
||
| 2294 | * {@inheritdoc} |
||
| 2295 | */ |
||
| 2296 | public function getSecurityInformation() |
||
| 2300 | |||
| 2301 | /** |
||
| 2302 | * Return the list of permissions the user should have in order to display the admin. |
||
| 2303 | * |
||
| 2304 | * @param string $context |
||
| 2305 | * |
||
| 2306 | * @return array |
||
| 2307 | */ |
||
| 2308 | public function getPermissionsShow($context) |
||
| 2317 | |||
| 2318 | /** |
||
| 2319 | * {@inheritdoc} |
||
| 2320 | */ |
||
| 2321 | public function showIn($context) |
||
| 2330 | |||
| 2331 | /** |
||
| 2332 | * {@inheritdoc} |
||
| 2333 | */ |
||
| 2334 | public function createObjectSecurity($object) |
||
| 2338 | |||
| 2339 | /** |
||
| 2340 | * {@inheritdoc} |
||
| 2341 | */ |
||
| 2342 | public function setSecurityHandler(SecurityHandlerInterface $securityHandler) |
||
| 2346 | |||
| 2347 | /** |
||
| 2348 | * {@inheritdoc} |
||
| 2349 | */ |
||
| 2350 | public function getSecurityHandler() |
||
| 2354 | |||
| 2355 | /** |
||
| 2356 | * {@inheritdoc} |
||
| 2357 | */ |
||
| 2358 | public function isGranted($name, $object = null) |
||
| 2368 | |||
| 2369 | /** |
||
| 2370 | * {@inheritdoc} |
||
| 2371 | */ |
||
| 2372 | public function getUrlsafeIdentifier($entity) |
||
| 2376 | |||
| 2377 | /** |
||
| 2378 | * {@inheritdoc} |
||
| 2379 | */ |
||
| 2380 | public function getNormalizedIdentifier($entity) |
||
| 2384 | |||
| 2385 | /** |
||
| 2386 | * {@inheritdoc} |
||
| 2387 | */ |
||
| 2388 | public function id($entity) |
||
| 2392 | |||
| 2393 | /** |
||
| 2394 | * {@inheritdoc} |
||
| 2395 | */ |
||
| 2396 | public function setValidator($validator) |
||
| 2408 | |||
| 2409 | /** |
||
| 2410 | * {@inheritdoc} |
||
| 2411 | */ |
||
| 2412 | public function getValidator() |
||
| 2416 | |||
| 2417 | /** |
||
| 2418 | * {@inheritdoc} |
||
| 2419 | */ |
||
| 2420 | public function getShow() |
||
| 2426 | |||
| 2427 | /** |
||
| 2428 | * {@inheritdoc} |
||
| 2429 | */ |
||
| 2430 | public function setFormTheme(array $formTheme) |
||
| 2434 | |||
| 2435 | /** |
||
| 2436 | * {@inheritdoc} |
||
| 2437 | */ |
||
| 2438 | public function getFormTheme() |
||
| 2442 | |||
| 2443 | /** |
||
| 2444 | * {@inheritdoc} |
||
| 2445 | */ |
||
| 2446 | public function setFilterTheme(array $filterTheme) |
||
| 2450 | |||
| 2451 | /** |
||
| 2452 | * {@inheritdoc} |
||
| 2453 | */ |
||
| 2454 | public function getFilterTheme() |
||
| 2458 | |||
| 2459 | /** |
||
| 2460 | * {@inheritdoc} |
||
| 2461 | */ |
||
| 2462 | public function addExtension(AdminExtensionInterface $extension) |
||
| 2466 | |||
| 2467 | /** |
||
| 2468 | * {@inheritdoc} |
||
| 2469 | */ |
||
| 2470 | public function getExtensions() |
||
| 2474 | |||
| 2475 | /** |
||
| 2476 | * {@inheritdoc} |
||
| 2477 | */ |
||
| 2478 | public function setMenuFactory(MenuFactoryInterface $menuFactory) |
||
| 2482 | |||
| 2483 | /** |
||
| 2484 | * {@inheritdoc} |
||
| 2485 | */ |
||
| 2486 | public function getMenuFactory() |
||
| 2490 | |||
| 2491 | /** |
||
| 2492 | * {@inheritdoc} |
||
| 2493 | */ |
||
| 2494 | public function setRouteBuilder(RouteBuilderInterface $routeBuilder) |
||
| 2498 | |||
| 2499 | /** |
||
| 2500 | * {@inheritdoc} |
||
| 2501 | */ |
||
| 2502 | public function getRouteBuilder() |
||
| 2506 | |||
| 2507 | /** |
||
| 2508 | * {@inheritdoc} |
||
| 2509 | */ |
||
| 2510 | public function toString($object) |
||
| 2522 | |||
| 2523 | /** |
||
| 2524 | * {@inheritdoc} |
||
| 2525 | */ |
||
| 2526 | public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy) |
||
| 2530 | |||
| 2531 | /** |
||
| 2532 | * {@inheritdoc} |
||
| 2533 | */ |
||
| 2534 | public function getLabelTranslatorStrategy() |
||
| 2538 | |||
| 2539 | /** |
||
| 2540 | * {@inheritdoc} |
||
| 2541 | */ |
||
| 2542 | public function supportsPreviewMode() |
||
| 2546 | |||
| 2547 | /** |
||
| 2548 | * Set custom per page options. |
||
| 2549 | * |
||
| 2550 | * @param array $options |
||
| 2551 | */ |
||
| 2552 | public function setPerPageOptions(array $options) |
||
| 2556 | |||
| 2557 | /** |
||
| 2558 | * Returns predefined per page options. |
||
| 2559 | * |
||
| 2560 | * @return array |
||
| 2561 | */ |
||
| 2562 | public function getPerPageOptions() |
||
| 2566 | |||
| 2567 | /** |
||
| 2568 | * Set pager type. |
||
| 2569 | * |
||
| 2570 | * @param string $pagerType |
||
| 2571 | */ |
||
| 2572 | public function setPagerType($pagerType) |
||
| 2576 | |||
| 2577 | /** |
||
| 2578 | * Get pager type. |
||
| 2579 | * |
||
| 2580 | * @return string |
||
| 2581 | */ |
||
| 2582 | public function getPagerType() |
||
| 2586 | |||
| 2587 | /** |
||
| 2588 | * Returns true if the per page value is allowed, false otherwise. |
||
| 2589 | * |
||
| 2590 | * @param int $perPage |
||
| 2591 | * |
||
| 2592 | * @return bool |
||
| 2593 | */ |
||
| 2594 | public function determinedPerPageValue($perPage) |
||
| 2598 | |||
| 2599 | /** |
||
| 2600 | * {@inheritdoc} |
||
| 2601 | */ |
||
| 2602 | public function isAclEnabled() |
||
| 2606 | |||
| 2607 | /** |
||
| 2608 | * {@inheritdoc} |
||
| 2609 | */ |
||
| 2610 | public function getObjectMetadata($object) |
||
| 2614 | |||
| 2615 | /** |
||
| 2616 | * {@inheritdoc} |
||
| 2617 | */ |
||
| 2618 | public function getListModes() |
||
| 2622 | |||
| 2623 | /** |
||
| 2624 | * {@inheritdoc} |
||
| 2625 | */ |
||
| 2626 | public function setListMode($mode) |
||
| 2634 | |||
| 2635 | /** |
||
| 2636 | * {@inheritdoc} |
||
| 2637 | */ |
||
| 2638 | public function getListMode() |
||
| 2646 | |||
| 2647 | /** |
||
| 2648 | * {@inheritdoc} |
||
| 2649 | */ |
||
| 2650 | public function getAccessMapping() |
||
| 2654 | |||
| 2655 | /** |
||
| 2656 | * {@inheritdoc} |
||
| 2657 | */ |
||
| 2658 | public function checkAccess($action, $object = null) |
||
| 2680 | |||
| 2681 | /** |
||
| 2682 | * {@inheritdoc} |
||
| 2683 | */ |
||
| 2684 | public function hasAccess($action, $object = null) |
||
| 2704 | |||
| 2705 | /** |
||
| 2706 | * {@inheritdoc} |
||
| 2707 | */ |
||
| 2708 | final public function getActionButtons($action, $object = null) |
||
| 2776 | |||
| 2777 | /** |
||
| 2778 | * {@inheritdoc} |
||
| 2779 | */ |
||
| 2780 | public function getDashboardActions() |
||
| 2805 | |||
| 2806 | /** |
||
| 2807 | * {@inheritdoc} |
||
| 2808 | */ |
||
| 2809 | final public function showMosaicButton($isShown) |
||
| 2817 | |||
| 2818 | /** |
||
| 2819 | * {@inheritdoc} |
||
| 2820 | */ |
||
| 2821 | final public function getSearchResultLink($object) |
||
| 2831 | |||
| 2832 | /** |
||
| 2833 | * Checks if a filter type is set to a default value. |
||
| 2834 | * |
||
| 2835 | * @param string $name |
||
| 2836 | * |
||
| 2837 | * @return bool |
||
| 2838 | */ |
||
| 2839 | final public function isDefaultFilter($name) |
||
| 2850 | |||
| 2851 | /** |
||
| 2852 | * Check object existence and access, without throw Exception. |
||
| 2853 | * |
||
| 2854 | * @param string $action |
||
| 2855 | * @param object $object |
||
| 2856 | * |
||
| 2857 | * @return bool |
||
| 2858 | */ |
||
| 2859 | public function canAccessObject($action, $object) |
||
| 2863 | |||
| 2864 | /** |
||
| 2865 | * Hook to run after initilization. |
||
| 2866 | */ |
||
| 2867 | protected function configure() |
||
| 2870 | |||
| 2871 | /** |
||
| 2872 | * urlize the given word. |
||
| 2873 | * |
||
| 2874 | * @param string $word |
||
| 2875 | * @param string $sep the separator |
||
| 2876 | * |
||
| 2877 | * @return string |
||
| 2878 | */ |
||
| 2879 | final protected function urlize($word, $sep = '_') |
||
| 2883 | |||
| 2884 | /** |
||
| 2885 | * Returns a list of default filters. |
||
| 2886 | * |
||
| 2887 | * @return array |
||
| 2888 | */ |
||
| 2889 | final protected function getDefaultFilterValues() |
||
| 2904 | |||
| 2905 | /** |
||
| 2906 | * {@inheritdoc} |
||
| 2907 | */ |
||
| 2908 | protected function configureFormFields(FormMapper $form) |
||
| 2911 | |||
| 2912 | /** |
||
| 2913 | * @param ListMapper $list |
||
| 2914 | */ |
||
| 2915 | protected function configureListFields(ListMapper $list) |
||
| 2918 | |||
| 2919 | /** |
||
| 2920 | * @param DatagridMapper $filter |
||
| 2921 | */ |
||
| 2922 | protected function configureDatagridFilters(DatagridMapper $filter) |
||
| 2925 | |||
| 2926 | /** |
||
| 2927 | * @param ShowMapper $show |
||
| 2928 | */ |
||
| 2929 | protected function configureShowFields(ShowMapper $show) |
||
| 2932 | |||
| 2933 | /** |
||
| 2934 | * @param RouteCollection $collection |
||
| 2935 | */ |
||
| 2936 | protected function configureRoutes(RouteCollection $collection) |
||
| 2939 | |||
| 2940 | /** |
||
| 2941 | * Configure buttons for an action. |
||
| 2942 | * |
||
| 2943 | * @param array $buttonList List of all action buttons |
||
| 2944 | * @param string $action Current action route |
||
| 2945 | * @param object $object Current object |
||
| 2946 | * |
||
| 2947 | * @return array |
||
| 2948 | */ |
||
| 2949 | protected function configureActionButtons($buttonList, $action, $object = null) |
||
| 2953 | |||
| 2954 | /** |
||
| 2955 | * Allows you to customize batch actions. |
||
| 2956 | * |
||
| 2957 | * @param array $actions List of actions |
||
| 2958 | * |
||
| 2959 | * @return array |
||
| 2960 | */ |
||
| 2961 | protected function configureBatchActions($actions) |
||
| 2965 | |||
| 2966 | /** |
||
| 2967 | * NEXT_MAJOR: remove this method. |
||
| 2968 | * |
||
| 2969 | * @param MenuItemInterface $menu |
||
| 2970 | * @param $action |
||
| 2971 | * @param AdminInterface $childAdmin |
||
| 2972 | * |
||
| 2973 | * @return mixed |
||
| 2974 | * |
||
| 2975 | * @deprecated Use configureTabMenu instead |
||
| 2976 | */ |
||
| 2977 | protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInterface $childAdmin = null) |
||
| 2980 | |||
| 2981 | /** |
||
| 2982 | * Configures the tab menu in your admin. |
||
| 2983 | * |
||
| 2984 | * @param MenuItemInterface $menu |
||
| 2985 | * @param string $action |
||
| 2986 | * @param AdminInterface $childAdmin |
||
| 2987 | * |
||
| 2988 | * @return mixed |
||
| 2989 | */ |
||
| 2990 | protected function configureTabMenu(MenuItemInterface $menu, $action, AdminInterface $childAdmin = null) |
||
| 2996 | |||
| 2997 | /** |
||
| 2998 | * build the view FieldDescription array. |
||
| 2999 | */ |
||
| 3000 | protected function buildShow() |
||
| 3015 | |||
| 3016 | /** |
||
| 3017 | * build the list FieldDescription array. |
||
| 3018 | */ |
||
| 3019 | protected function buildList() |
||
| 3071 | |||
| 3072 | /** |
||
| 3073 | * Build the form FieldDescription collection. |
||
| 3074 | */ |
||
| 3075 | protected function buildForm() |
||
| 3103 | |||
| 3104 | /** |
||
| 3105 | * Gets the subclass corresponding to the given name. |
||
| 3106 | * |
||
| 3107 | * @param string $name The name of the sub class |
||
| 3108 | * |
||
| 3109 | * @return string the subclass |
||
| 3110 | */ |
||
| 3111 | protected function getSubClass($name) |
||
| 3123 | |||
| 3124 | /** |
||
| 3125 | * Attach the inline validator to the model metadata, this must be done once per admin. |
||
| 3126 | */ |
||
| 3127 | protected function attachInlineValidator() |
||
| 3159 | |||
| 3160 | /** |
||
| 3161 | * Predefine per page options. |
||
| 3162 | */ |
||
| 3163 | protected function predefinePerPageOptions() |
||
| 3169 | |||
| 3170 | /** |
||
| 3171 | * Return list routes with permissions name. |
||
| 3172 | * |
||
| 3173 | * @return array |
||
| 3174 | */ |
||
| 3175 | protected function getAccess() |
||
| 3197 | |||
| 3198 | /** |
||
| 3199 | * Returns a list of default filters. |
||
| 3200 | * |
||
| 3201 | * @param array $filterValues |
||
| 3202 | */ |
||
| 3203 | protected function configureDefaultFilterValues(array &$filterValues) |
||
| 3206 | |||
| 3207 | /** |
||
| 3208 | * {@inheritdoc} |
||
| 3209 | */ |
||
| 3210 | private function buildDatagrid() |
||
| 3262 | |||
| 3263 | /** |
||
| 3264 | * Build all the related urls to the current admin. |
||
| 3265 | */ |
||
| 3266 | private function buildRoutes() |
||
| 3289 | } |
||
| 3290 |
This check marks private properties in classes that are never used. Those properties can be removed.