AdminInterface.php 23 KB

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