本文整理汇总了PHP中Cms\Classes\Page::sortBy方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::sortBy方法的具体用法?PHP Page::sortBy怎么用?PHP Page::sortBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cms\Classes\Page
的用法示例。
在下文中一共展示了Page::sortBy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPropertyOptions
public function getPropertyOptions($property)
{
if ($property == 'eventPage') {
return Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
}
return self::getPropertyOptions($property);
}
示例2: getParentOptions
public function getParentOptions()
{
$ParentOptions = array('' => '-- chose one --');
$pages = Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
$ParentOptions = array_merge($ParentOptions, $pages);
return $ParentOptions;
}
示例3: getSpecificOptions
public function getSpecificOptions()
{
$renderType = Request::input('render');
// Load the country property value from POST
$pages = Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
$Options = ['none' => [], 'settings' => [], 'parent' => [], 'specific' => $pages];
return $Options[$renderType];
}
示例4: getUrlOptions
/**
* Get a list of all pages. Prepend an empty option to the start
*
* @return array
*/
public function getUrlOptions()
{
$allPages = Page::sortBy('baseFileName')->lists('title', 'baseFileName');
$pages = array('' => 'No page link');
foreach ($allPages as $key => $value) {
$pages[$key] = "{$key}";
}
return $pages;
}
示例5: getListPages
private function getListPages()
{
$pages = Page::sortBy('baseFileName')->lists('baseFileName', 'url');
return ['' => '- none -'] + $pages;
}
示例6: listPages
/**
* Returns a list of CMS pages as array of page file paths and titles.
* @return array
*/
public static function listPages()
{
Flash::warning("CmsPropertyHelper::listPages() is deprecated, use Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName') instead.");
return Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
}
示例7: getGoToNotificationPageOptions
public function getGoToNotificationPageOptions()
{
$pages = Page::sortBy('baseFileName')->lists('baseFileName', 'url');
return ['' => '- none -'] + $pages;
}
示例8: listPages
public function listPages()
{
return \Cms\Classes\Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
}
示例9: testGetPostPageOptions
/**
* @covers Shahin\Events\Components\EventLists::getPostPageOptions
* @todo Implement testGetPostPageOptions().
*/
public function testGetPostPageOptions()
{
$eventList = new EventLists();
$page = Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
$this->assertTrue($eventList->getPostPageOptions() == $page);
}
示例10: getPropertyOptions
public function getPropertyOptions($property)
{
return Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
}
示例11: getDetailsPageOptions
public function getDetailsPageOptions()
{
$pages = Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
$pages = ['-' => Lang::get('rainlab.builder::lang.components.list_details_page_no')] + $pages;
return $pages;
}
示例12: getRedirectInternalOptions
public function getRedirectInternalOptions()
{
return Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
}
示例13: getDefaultParentOptions
public function getDefaultParentOptions()
{
return Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName');
}
示例14: getUrlOptions
/**
* Get a list of all pages. Prepend an empty option to the start
*
* @return array
*/
public function getUrlOptions()
{
$allPages = Page::sortBy('baseFileName')->lists('title', 'baseFileName');
$pages = array('' => Lang::get('benfreke.menumanager::lang.create.nolink'));
foreach ($allPages as $key => $value) {
$pages[$key] = "{$value} - (File: {$key})";
}
return $pages;
}
示例15: getRedirectURLOptions
public function getRedirectURLOptions()
{
return array_merge(['' => Lang::get('octodevel.octomail::lang.components.mailTemplate.default.options.none')], Page::sortBy('baseFileName')->lists('baseFileName', 'baseFileName'));
}