/**
  * Only show first element, as the profile form is limited to editing
  * the current member it doesn't make much sense to show the member name
  * in the breadcrumbs.
  *
  * @param bool $unlinked
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     return new ArrayList(array($items[0]));
 }
 /**
  * @param bool $unlinked
  * @return ArrayList
  */
 public function Breadcrumbs($unlinked = false)
 {
     $items = parent::Breadcrumbs($unlinked);
     // Show the class name rather than ModelAdmin title as root node
     $models = $this->getManagedModels();
     $params = $this->getRequest()->getVars();
     if (isset($params['url'])) {
         unset($params['url']);
     }
     $items[0]->Title = $models[$this->modelClass]['title'];
     $items[0]->Link = Controller::join_links($this->Link($this->sanitiseClassName($this->modelClass)), '?' . http_build_query($params));
     return $items;
 }
 public function Breadcrumbs($unlinked = false)
 {
     $crumbs = parent::Breadcrumbs($unlinked);
     // Name root breadcrumb based on which record is edited,
     // which can only be determined by looking for the fieldname of the GridField.
     // Note: Titles should be same titles as tabs in RootForm().
     $params = $this->getRequest()->allParams();
     if (isset($params['FieldName'])) {
         // TODO FieldName param gets overwritten by nested GridFields,
         // so shows "Members" rather than "Groups" for the following URL:
         // admin/security/EditForm/field/Groups/item/2/ItemEditForm/field/Members/item/1/edit
         $firstCrumb = $crumbs->shift();
         if ($params['FieldName'] == 'Groups') {
             $crumbs->unshift(new ArrayData(array('Title' => Group::singleton()->i18n_plural_name(), 'Link' => $this->Link('groups'))));
         } elseif ($params['FieldName'] == 'Users') {
             $crumbs->unshift(new ArrayData(array('Title' => _t('SecurityAdmin.Users', 'Users'), 'Link' => $this->Link('users'))));
         } elseif ($params['FieldName'] == 'Roles') {
             $crumbs->unshift(new ArrayData(array('Title' => _t('SecurityAdmin.TABROLES', 'Roles'), 'Link' => $this->Link('roles'))));
         }
         $crumbs->unshift($firstCrumb);
     }
     return $crumbs;
 }