AdminInterface.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985
  1. <?php
  2. /*
  3. * This file is part of the Sonata package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Sonata\AdminBundle\Admin;
  11. use Sonata\AdminBundle\Admin\Pool;
  12. use Sonata\AdminBundle\Admin\FieldDescriptionInterface;
  13. use Sonata\AdminBundle\Builder\FormContractorInterface;
  14. use Sonata\AdminBundle\Builder\ListBuilderInterface;
  15. use Sonata\AdminBundle\Builder\DatagridBuilderInterface;
  16. use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
  17. use Sonata\AdminBundle\Security\Handler\SecurityHandlerInterface;
  18. use Sonata\AdminBundle\Builder\RouteBuilderInterface;
  19. use Sonata\AdminBundle\Translator\LabelTranslatorStrategyInterface;
  20. use Sonata\AdminBundle\Validator\ErrorElement;
  21. use Sonata\AdminBundle\Route\RouteGeneratorInterface;
  22. use Knp\Menu\FactoryInterface as MenuFactoryInterface;
  23. use Symfony\Component\Validator\ValidatorInterface;
  24. use Symfony\Component\Translation\TranslatorInterface;
  25. use Symfony\Component\HttpFoundation\Request;
  26. interface AdminInterface
  27. {
  28. /**
  29. * @param \Sonata\AdminBundle\Builder\FormContractorInterface $formContractor
  30. *
  31. * @return void
  32. */
  33. public function setFormContractor(FormContractorInterface $formContractor);
  34. /**
  35. * Set ListBuilder
  36. *
  37. * @param ListBuilderInterface $listBuilder
  38. *
  39. * @return void
  40. */
  41. public function setListBuilder(ListBuilderInterface $listBuilder);
  42. /**
  43. * Get ListBuilder
  44. *
  45. * @return \Sonata\AdminBundle\Builder\ListBuilderInterface
  46. */
  47. public function getListBuilder();
  48. /**
  49. * Set DatagridBuilder
  50. *
  51. * @param \Sonata\AdminBundle\Builder\DatagridBuilderInterface $datagridBuilder
  52. *
  53. * @return void
  54. */
  55. public function setDatagridBuilder(DatagridBuilderInterface $datagridBuilder);
  56. /**
  57. * Get DatagridBuilder
  58. *
  59. * @return \Sonata\AdminBundle\Builder\DatagridBuilderInterface
  60. */
  61. public function getDatagridBuilder();
  62. /**
  63. * Set translator
  64. *
  65. * @param \Symfony\Component\Translation\TranslatorInterface $translator
  66. *
  67. * @return void
  68. */
  69. public function setTranslator(TranslatorInterface $translator);
  70. /**
  71. * Get translator
  72. *
  73. * @return \Symfony\Component\Translation\TranslatorInterface
  74. */
  75. public function getTranslator();
  76. /**
  77. * @param \Symfony\Component\HttpFoundation\Request $request
  78. *
  79. * @return void
  80. */
  81. public function setRequest(Request $request);
  82. /**
  83. * @param Pool $pool
  84. *
  85. * @return void
  86. */
  87. public function setConfigurationPool(Pool $pool);
  88. /**
  89. * @param \Sonata\AdminBundle\Route\RouteGeneratorInterface $routeGenerator
  90. *
  91. * @return void
  92. */
  93. public function setRouteGenerator(RouteGeneratorInterface $routeGenerator);
  94. /**
  95. * Returns subjectClass/class/subclass name managed
  96. * - subclass name if subclass parameter is defined
  97. * - subject class name if subject is defined
  98. * - class name if not
  99. *
  100. * @return string
  101. */
  102. public function getClass();
  103. /**
  104. * @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
  105. *
  106. * @return void
  107. */
  108. public function attachAdminClass(FieldDescriptionInterface $fieldDescription);
  109. /**
  110. * @return \Sonata\AdminBundle\Datagrid\DatagridInterface
  111. */
  112. public function getDatagrid();
  113. /**
  114. * Set base controller name
  115. *
  116. * @param string $baseControllerName
  117. */
  118. public function setBaseControllerName($baseControllerName);
  119. /**
  120. * Get base controller name
  121. *
  122. * @return string
  123. */
  124. public function getBaseControllerName();
  125. /**
  126. * Generates the object url with the given $name
  127. *
  128. * @param string $name
  129. * @param mixed $object
  130. * @param array $parameters
  131. * @param boolean $absolute
  132. *
  133. * @return string return a complete url
  134. */
  135. public function generateObjectUrl($name, $object, array $parameters = array(), $absolute = false);
  136. /**
  137. * Generates an url for the given parameters
  138. *
  139. * @param string $name
  140. * @param array $parameters
  141. * @param bool $absolute
  142. *
  143. * @return string return a complete url
  144. */
  145. public function generateUrl($name, array $parameters = array(), $absolute = false);
  146. /**
  147. * Generates an url for the given parameters
  148. *
  149. * @param string $name
  150. * @param array $parameters
  151. * @param bool $absolute
  152. *
  153. * @return string return a complete url
  154. */
  155. public function generateMenuUrl($name, array $parameters = array(), $absolute = false);
  156. /**
  157. * @return \Sonata\AdminBundle\Model\ModelManagerInterface;
  158. */
  159. public function getModelManager();
  160. /**
  161. * @return string the manager type of the admin
  162. */
  163. public function getManagerType();
  164. /**
  165. * @param string $context
  166. *
  167. * @return \Sonata\AdminBundle\Datagrid\ProxyQueryInterface
  168. */
  169. public function createQuery($context = 'list');
  170. /**
  171. * @return \Symfony\Component\Form\FormBuilder the form builder
  172. */
  173. public function getFormBuilder();
  174. /**
  175. * Return FormFieldDescription
  176. *
  177. * @param string $name
  178. *
  179. * @return \Sonata\AdminBundle\Admin\FieldDescriptionInterface
  180. */
  181. public function getFormFieldDescription($name);
  182. /**
  183. * Build and return the collection of form FieldDescription
  184. *
  185. * @return array collection of form FieldDescription
  186. */
  187. public function getFormFieldDescriptions();
  188. /**
  189. * Returns a form depend on the given $object
  190. *
  191. * @return \Symfony\Component\Form\Form
  192. */
  193. public function getForm();
  194. /**
  195. * @return \Symfony\Component\HttpFoundation\Request
  196. *
  197. * @throws \RuntimeException if no request is set.
  198. */
  199. public function getRequest();
  200. /**
  201. * @return boolean true if a request object is linked to this Admin, false
  202. * otherwise.
  203. */
  204. public function hasRequest();
  205. /**
  206. *
  207. * @return string
  208. */
  209. public function getCode();
  210. /**
  211. *
  212. * @return string
  213. */
  214. public function getBaseCodeRoute();
  215. /**
  216. * Return the roles and permissions per role
  217. * - different permissions per role for the acl handler
  218. * - one permission that has the same name as the role for the role handler
  219. * This should be used by experimented users
  220. *
  221. * @return array [role] => array([permission], [permission])
  222. */
  223. public function getSecurityInformation();
  224. /**
  225. * @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $parentFieldDescription
  226. *
  227. * @return void
  228. */
  229. public function setParentFieldDescription(FieldDescriptionInterface $parentFieldDescription);
  230. /**
  231. * Get parent field description
  232. *
  233. * @return \Sonata\AdminBundle\Admin\FieldDescriptionInterface The parent field description
  234. */
  235. public function getParentFieldDescription();
  236. /**
  237. * Returns true if the Admin is linked to a parent FieldDescription
  238. *
  239. * @return bool
  240. */
  241. public function hasParentFieldDescription();
  242. /**
  243. * translate a message id
  244. *
  245. * @param string $id
  246. * @param array $parameters
  247. * @param null $domain
  248. * @param null $locale
  249. *
  250. * @return string the translated string
  251. */
  252. public function trans($id, array $parameters = array(), $domain = null, $locale = null);
  253. /**
  254. * Returns the list of available urls
  255. *
  256. * @return \Sonata\AdminBundle\Route\RouteCollection the list of available urls
  257. */
  258. public function getRoutes();
  259. /**
  260. * Return the parameter name used to represent the id in the url
  261. *
  262. * @return string
  263. */
  264. public function getRouterIdParameter();
  265. /**
  266. * Returns the parameter representing request id, ie: id or childId
  267. *
  268. * @return string
  269. */
  270. public function getIdParameter();
  271. /**
  272. * Returns true if the admin has a FieldDescription with the given $name
  273. *
  274. * @param string $name
  275. *
  276. * @return bool
  277. */
  278. public function hasShowFieldDescription($name);
  279. /**
  280. * add a FieldDescription
  281. *
  282. * @param string $name
  283. * @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
  284. *
  285. * @return void
  286. */
  287. public function addShowFieldDescription($name, FieldDescriptionInterface $fieldDescription);
  288. /**
  289. * Remove a ShowFieldDescription
  290. *
  291. * @param string $name
  292. */
  293. public function removeShowFieldDescription($name);
  294. /**
  295. * add a list FieldDescription
  296. *
  297. * @param string $name
  298. * @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
  299. *
  300. * @return void
  301. */
  302. public function addListFieldDescription($name, FieldDescriptionInterface $fieldDescription);
  303. /**
  304. * Remove a list FieldDescription
  305. *
  306. * @param string $name
  307. *
  308. * @return void
  309. */
  310. public function removeListFieldDescription($name);
  311. /**
  312. * Returns true if the filter FieldDescription exists
  313. *
  314. * @param string $name
  315. *
  316. * @return bool
  317. */
  318. public function hasFilterFieldDescription($name);
  319. /**
  320. * add a filter FieldDescription
  321. *
  322. * @param string $name
  323. * @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
  324. *
  325. * @return void
  326. */
  327. public function addFilterFieldDescription($name, FieldDescriptionInterface $fieldDescription);
  328. /**
  329. * Remove a filter FieldDescription
  330. *
  331. * @param string $name
  332. */
  333. public function removeFilterFieldDescription($name);
  334. /**
  335. * Returns the filter FieldDescription collection
  336. *
  337. * @return FieldDescriptionInterface[]
  338. */
  339. public function getFilterFieldDescriptions();
  340. /**
  341. * Returns a list depend on the given $object
  342. *
  343. * @return \Sonata\AdminBundle\Admin\FieldDescriptionCollection
  344. */
  345. public function getList();
  346. /**
  347. * @param \Sonata\AdminBundle\Security\Handler\SecurityHandlerInterface $securityHandler
  348. *
  349. * @return void
  350. */
  351. public function setSecurityHandler(SecurityHandlerInterface $securityHandler);
  352. /**
  353. * @return \Sonata\AdminBundle\Security\Handler\SecurityHandlerInterface|null
  354. */
  355. public function getSecurityHandler();
  356. /**
  357. * @param string $name
  358. * @param object|null $object
  359. *
  360. * @return boolean
  361. */
  362. public function isGranted($name, $object = null);
  363. /**
  364. * @param mixed $entity
  365. */
  366. public function getUrlsafeIdentifier($entity);
  367. /**
  368. * @param mixed $entity
  369. */
  370. public function getNormalizedIdentifier($entity);
  371. /**
  372. * Shorthand method for templating
  373. *
  374. * @param object $entity
  375. *
  376. * @return mixed
  377. */
  378. public function id($entity);
  379. /**
  380. * @param \Symfony\Component\Validator\ValidatorInterface $validator
  381. *
  382. * @return void
  383. */
  384. public function setValidator(ValidatorInterface $validator);
  385. /**
  386. * @return \Symfony\Component\Validator\ValidatorInterface
  387. */
  388. public function getValidator();
  389. /**
  390. * @return array
  391. */
  392. public function getShow();
  393. /**
  394. * @param array $formTheme
  395. *
  396. * @return void
  397. */
  398. public function setFormTheme(array $formTheme);
  399. /**
  400. * @return array
  401. */
  402. public function getFormTheme();
  403. /**
  404. * @param array $filterTheme
  405. *
  406. * @return void
  407. */
  408. public function setFilterTheme(array $filterTheme);
  409. /**
  410. * @return array
  411. */
  412. public function getFilterTheme();
  413. /**
  414. * @param AdminExtensionInterface $extension
  415. *
  416. * @return void
  417. */
  418. public function addExtension(AdminExtensionInterface $extension);
  419. /**
  420. * Returns an array of extension related to the current Admin
  421. *
  422. * @return AdminExtensionInterface[]
  423. */
  424. public function getExtensions();
  425. /**
  426. * @param \Knp\Menu\FactoryInterface $menuFactory
  427. *
  428. * @return void
  429. */
  430. public function setMenuFactory(MenuFactoryInterface $menuFactory);
  431. /**
  432. * @return \Knp\Menu\FactoryInterface
  433. */
  434. public function getMenuFactory();
  435. /**
  436. * @param \Sonata\AdminBundle\Builder\RouteBuilderInterface $routeBuilder
  437. */
  438. public function setRouteBuilder(RouteBuilderInterface $routeBuilder);
  439. /**
  440. * @return \Sonata\AdminBundle\Builder\RouteBuilderInterface
  441. */
  442. public function getRouteBuilder();
  443. /**
  444. * @param mixed $object
  445. *
  446. * @return string
  447. */
  448. public function toString($object);
  449. /**
  450. * @param \Sonata\Adminbundle\Translator\LabelTranslatorStrategyInterface $labelTranslatorStrategy
  451. */
  452. public function setLabelTranslatorStrategy(LabelTranslatorStrategyInterface $labelTranslatorStrategy);
  453. /**
  454. * @return \Sonata\AdminBundle\Translator\LabelTranslatorStrategyInterface
  455. */
  456. public function getLabelTranslatorStrategy();
  457. /**
  458. * Returning true will enable preview mode for
  459. * the target entity and show a preview button
  460. * when editing/creating an entity
  461. *
  462. * @return boolean
  463. */
  464. public function supportsPreviewMode();
  465. /**
  466. * add an Admin child to the current one
  467. *
  468. * @param \Sonata\AdminBundle\Admin\AdminInterface $child
  469. *
  470. * @return void
  471. */
  472. public function addChild(AdminInterface $child);
  473. /**
  474. * Returns true or false if an Admin child exists for the given $code
  475. *
  476. * @param string $code Admin code
  477. *
  478. * @return bool True if child exist, false otherwise
  479. */
  480. public function hasChild($code);
  481. /**
  482. * Returns an collection of admin children
  483. *
  484. * @return array list of Admin children
  485. */
  486. public function getChildren();
  487. /**
  488. * Returns an admin child with the given $code
  489. *
  490. * @param string $code
  491. *
  492. * @return array|null
  493. */
  494. public function getChild($code);
  495. /**
  496. * @return mixed a new object instance
  497. */
  498. public function getNewInstance();
  499. /**
  500. * @param string $uniqId
  501. *
  502. * @return mixed
  503. */
  504. public function setUniqid($uniqId);
  505. /**
  506. * Returns the uniqid
  507. *
  508. * @return integer
  509. */
  510. public function getUniqid();
  511. /**
  512. * @param mixed $id
  513. *
  514. * @return mixed
  515. */
  516. public function getObject($id);
  517. /**
  518. * @param string $subject
  519. *
  520. * @return mixed
  521. */
  522. public function setSubject($subject);
  523. /**
  524. * @return mixed
  525. */
  526. public function getSubject();
  527. /**
  528. * Returns a list FieldDescription
  529. *
  530. * @param string $name
  531. *
  532. * @return \Sonata\AdminBundle\Admin\FieldDescriptionInterface
  533. */
  534. public function getListFieldDescription($name);
  535. /**
  536. * Returns true if the list FieldDescription exists
  537. *
  538. * @param string $name
  539. *
  540. * @return bool
  541. */
  542. public function hasListFieldDescription($name);
  543. /**
  544. * Returns the collection of list FieldDescriptions
  545. *
  546. * @return array
  547. */
  548. public function getListFieldDescriptions();
  549. /**
  550. * Returns the array of allowed export formats
  551. *
  552. * @return array
  553. */
  554. public function getExportFormats();
  555. /**
  556. * Returns SourceIterator
  557. *
  558. * @return \Exporter\Source\SourceIteratorInterface
  559. */
  560. public function getDataSourceIterator();
  561. /**
  562. * @return void
  563. */
  564. public function configure();
  565. /**
  566. * @param mixed $object
  567. *
  568. * @return mixed
  569. */
  570. public function update($object);
  571. /**
  572. * @param mixed $object
  573. *
  574. * @return mixed
  575. */
  576. public function create($object);
  577. /**
  578. * @param mixed $object
  579. *
  580. * @return mixed
  581. */
  582. public function delete($object);
  583. /**
  584. * @param mixed $object
  585. *
  586. * @return mixed
  587. */
  588. public function preUpdate($object);
  589. /**
  590. * @param mixed $object
  591. *
  592. * @return mixed
  593. */
  594. public function postUpdate($object);
  595. /**
  596. * @param mixed $object
  597. *
  598. * @return mixed
  599. */
  600. public function prePersist($object);
  601. /**
  602. * @param mixed $object
  603. *
  604. * @return mixed
  605. */
  606. public function postPersist($object);
  607. /**
  608. * @param mixed $object
  609. *
  610. * @return mixed
  611. */
  612. public function preRemove($object);
  613. /**
  614. * @param mixed $object
  615. *
  616. * @return mixed
  617. */
  618. public function postRemove($object);
  619. /**
  620. * Call before the batch action, allow you to alter the query and the idx
  621. *
  622. * @param string $actionName
  623. * @param ProxyQueryInterface $query
  624. * @param array $idx
  625. * @param bool $allElements
  626. */
  627. public function preBatchAction($actionName, ProxyQueryInterface $query, array & $idx, $allElements);
  628. /**
  629. * Return array of filter parameters.
  630. *
  631. * @return array
  632. */
  633. public function getFilterParameters();
  634. /**
  635. * Return true if the Admin is related to a subject
  636. *
  637. * @return boolean
  638. */
  639. public function hasSubject();
  640. /**
  641. *
  642. * @param \Sonata\AdminBundle\Validator\ErrorElement $errorElement
  643. * @param mixed $object
  644. *
  645. * @return void
  646. *
  647. * @deprecated this feature cannot be stable, use a custom validator,
  648. * the feature will be removed with Symfony 2.2
  649. */
  650. public function validate(ErrorElement $errorElement, $object);
  651. /**
  652. * @param string $context
  653. *
  654. * @return boolean
  655. */
  656. public function showIn($context);
  657. /**
  658. * Add object security, fe. make the current user owner of the object
  659. *
  660. * @param mixed $object
  661. */
  662. public function createObjectSecurity($object);
  663. /**
  664. * Returns the url defined by the $name
  665. *
  666. * @param string $name
  667. *
  668. * @return \Symfony\Component\Routing\Route
  669. */
  670. public function getRoute($name);
  671. /**
  672. * @return AdminInterface
  673. */
  674. public function getParent();
  675. /**
  676. * @param AdminInterface $admin
  677. *
  678. * @return void
  679. */
  680. public function setParent(AdminInterface $admin);
  681. /**
  682. * Returns true if the Admin class has an Parent Admin defined
  683. *
  684. * @return boolean
  685. */
  686. public function isChild();
  687. /**
  688. * Returns template
  689. *
  690. * @param string $name
  691. *
  692. * @return null|string
  693. */
  694. public function getTemplate($name);
  695. /**
  696. * Set the translation domain
  697. *
  698. * @param string $translationDomain the translation domain
  699. *
  700. * @return void
  701. */
  702. public function setTranslationDomain($translationDomain);
  703. /**
  704. * Returns the translation domain
  705. *
  706. * @return string the translation domain
  707. */
  708. public function getTranslationDomain();
  709. /**
  710. * Return the form groups
  711. *
  712. * @return array
  713. */
  714. public function getFormGroups();
  715. /**
  716. * Set the form groups
  717. *
  718. * @param array $formGroups
  719. */
  720. public function setFormGroups(array $formGroups);
  721. /**
  722. * Remove a form group field
  723. *
  724. * @param $key
  725. *
  726. * @return void
  727. */
  728. public function removeFieldFromFormGroup($key);
  729. /**
  730. * Returns the show groups
  731. *
  732. * @return array
  733. */
  734. public function getShowGroups();
  735. /**
  736. * Set the show groups
  737. *
  738. * @param array $showGroups
  739. */
  740. public function setShowGroups(array $showGroups);
  741. /**
  742. * Reorder items in showGroup
  743. *
  744. * @param string $group
  745. * @param array $keys
  746. */
  747. public function reorderShowGroup($group, array $keys);
  748. /**
  749. * add a FieldDescription
  750. *
  751. * @param string $name
  752. * @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
  753. *
  754. * @return void
  755. */
  756. public function addFormFieldDescription($name, FieldDescriptionInterface $fieldDescription);
  757. /**
  758. * Remove a FieldDescription
  759. *
  760. * @param string $name
  761. *
  762. * @return void
  763. */
  764. public function removeFormFieldDescription($name);
  765. /**
  766. * Returns true if this admin uses ACL
  767. *
  768. * @return boolean
  769. */
  770. public function isAclEnabled();
  771. /**
  772. * Sets the list of supported sub classes
  773. *
  774. * @param array $subClasses the list of sub classes
  775. */
  776. public function setSubClasses(array $subClasses);
  777. /**
  778. * Returns true if the admin has the sub classes
  779. *
  780. * @param string $name The name of the sub class
  781. *
  782. * @return bool
  783. */
  784. public function hasSubClass($name);
  785. /**
  786. * Returns true if a subclass is currently active
  787. *
  788. * @return bool
  789. */
  790. public function hasActiveSubClass();
  791. /**
  792. * Returns the currently active sub class
  793. *
  794. * @return string the active sub class
  795. */
  796. public function getActiveSubClass();
  797. /**
  798. * Returns the currently active sub class code
  799. *
  800. * @return string the code for active sub class
  801. */
  802. public function getActiveSubclassCode();
  803. /**
  804. * Returns the list of batchs actions
  805. *
  806. * @return array the list of batchs actions
  807. */
  808. public function getBatchActions();
  809. /**
  810. * Returns Admin`s label
  811. *
  812. * @return string
  813. */
  814. public function getLabel();
  815. /**
  816. * Returns an array of persistent parameters
  817. *
  818. * @return array
  819. */
  820. public function getPersistentParameters();
  821. /**
  822. * Get breadcrumbs for $action
  823. *
  824. * @param string $action
  825. *
  826. * @return array
  827. */
  828. public function getBreadcrumbs($action);
  829. /**
  830. * Set the current child status
  831. *
  832. * @param boolean $currentChild
  833. */
  834. public function setCurrentChild($currentChild);
  835. /**
  836. * Returns the current child status
  837. *
  838. * @return bool
  839. */
  840. public function getCurrentChild();
  841. /**
  842. * Get translation label using the current TranslationStrategy.
  843. *
  844. * @param string $label
  845. * @param string $context
  846. * @param string $type
  847. *
  848. * @return string
  849. */
  850. public function getTranslationLabel($label, $context = '', $type = '');
  851. }