本文整理汇总了PHP中LeftAndMain::Breadcrumbs方法的典型用法代码示例。如果您正苦于以下问题:PHP LeftAndMain::Breadcrumbs方法的具体用法?PHP LeftAndMain::Breadcrumbs怎么用?PHP LeftAndMain::Breadcrumbs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LeftAndMain
的用法示例。
在下文中一共展示了LeftAndMain::Breadcrumbs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Breadcrumbs
/**
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
$items[0]->Link = singleton('CloudinaryAdmin')->Link('show');
$items->push(new ArrayData(array('Title' => _t('CloudinaryAdmin.Upload', 'Upload'), 'Link' => $this->Link())));
return $items;
}
开发者ID:helpfulrobot,项目名称:mademedia-silverstripe-cloudinary,代码行数:11,代码来源:CloudinaryFileAddController.php
示例2: Breadcrumbs
/**
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
// The root element should explicitly point to the root node.
$items[0]->Link = Controller::join_links(singleton('AssetAdmin')->Link('show'), 0);
// Enforce linkage of hierarchy to AssetAdmin
foreach ($items as $item) {
$baselink = $this->Link('show');
if (strpos($item->Link, $baselink) !== false) {
$item->Link = str_replace($baselink, singleton('AssetAdmin')->Link('show'), $item->Link);
}
}
$items->push(new ArrayData(array('Title' => _t('AssetAdmin.Upload', 'Upload'), 'Link' => $this->Link())));
return $items;
}
示例3: Breadcrumbs
/**
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
// The root element should point to the pages tree view,
// rather than the actual controller (which would just show an empty edit form)
$defaultTitle = self::menu_title_for_class('ContentModulesController');
$items[0]->Title = _t("{$this->class}.MENUTITLE", $defaultTitle);
$items[0]->Link = singleton('ContentModulesController')->Link();
return $items;
}
示例4: Breadcrumbs
/**
* @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->request->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;
}
示例5: Breadcrumbs
/**
* Returns the Breadcrumbs for the ReportAdmin
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
// The root element should explicitly point to the root node.
// Uses session state for current record otherwise.
$items[0]->Link = singleton('ReportAdmin')->Link();
if ($this->reportObject) {
//build breadcrumb trail to the current report
$items->push(new ArrayData(array('Title' => $this->reportObject->title(), 'Link' => Controller::join_links($this->Link(), '?' . http_build_query(array('q' => $this->request->requestVar('q')))))));
}
return $items;
}
示例6: Breadcrumbs
/**
* @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();
$items[0]->Title = $models[$this->modelClass]['title'];
$items[0]->Link = $this->Link($this->sanitiseClassName($this->modelClass));
return $items;
}
示例7: Breadcrumbs
/**
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
// The root element should explicitly point to the root node.
// Uses session state for current record otherwise.
$items[0]->Link = Controller::join_links(singleton('AssetAdmin')->Link('show'), 0);
// If a search is in progress, don't show the path
if ($this->getRequest()->requestVar('q')) {
$items = $items->limit(1);
$items->push(new ArrayData(array('Title' => _t('LeftAndMain.SearchResults', 'Search Results'), 'Link' => Controller::join_links($this->Link(), '?' . http_build_query(array('q' => $this->getRequest()->requestVar('q')))))));
}
// If we're adding a folder, note that in breadcrumbs as well
if ($this->getRequest()->param('Action') == 'addfolder') {
$items->push(new ArrayData(array('Title' => _t('Folder.AddFolderButton', 'Add folder'), 'Link' => false)));
}
return $items;
}
示例8: Breadcrumbs
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' => singleton('Group')->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;
}
示例9: Breadcrumbs
public function Breadcrumbs($unlinked = false)
{
return parent::Breadcrumbs($unlinked = false);
}
示例10: Breadcrumbs
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->request->allParams();
if(isset($params['FieldName'])) {
if($params['FieldName'] == 'Groups') {
$crumbs->First()->Title = singleton('Group')->plural_name();
} elseif($params['FieldName'] == 'Users') {
$crumbs->First()->Title = _t('SecurityAdmin.Users', 'Users');
} elseif($params['FieldName'] == 'Roles') {
$crumbs->First()->Title = _t('SecurityAdmin.TABROLES', 'Roles');
}
} else {
// Avoid writing "Users" (the controller menu title) as a breadcrumb
// because its confusing and inaccurate.
$crumbs = new ArrayList();
}
return $crumbs;
}
示例11: Breadcrumbs
/**
* 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.
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
return new ArrayList(array($items[0]));
}
示例12: Breadcrumbs
public function Breadcrumbs($unlinked = false)
{
$sng = singleton('KapostAdmin');
$crumbs = new ArrayList(array(new ArrayData(array('Title' => $sng->SectionTitle(), 'Link' => $unlinked ? false : $sng->Link()))));
$crumbs->merge(parent::Breadcrumbs($unlinked));
return $crumbs;
}
开发者ID:webbuilders-group,项目名称:silverstripe-kapost-bridge-logger,代码行数:7,代码来源:KapostBridgeLogViewer.php
示例13: Breadcrumbs
/**
* @param bool $unlinked
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
$items = parent::Breadcrumbs($unlinked);
if ($items->count() > 1) {
// Specific to the SiteTree admin section, we never show the cms section and current
// page in the same breadcrumbs block.
$items->shift();
}
return $items;
}
示例14: Breadcrumbs
/**
* @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();
$modelSpec = ArrayLib::is_associative($models) ? $models[$this->modelClass] : null;
if(is_array($modelSpec) && isset($modelSpec['title'])) {
$items[0]->Title = $modelSpec['title'];
} else {
$items[0]->Title = singleton($this->modelClass)->i18n_singular_name();
}
return $items;
}
示例15: Breadcrumbs
/**
* Returns the Breadcrumbs for the LiveChatAdmin
* @return ArrayList
*/
public function Breadcrumbs($unlinked = false)
{
return new ArrayList(array(new ArrayData(array('Title' => 'live chat', 'Link' => '/admin/' . self::$tree_class))));
return parent::Breadcrumbs($unlinked);
}