本文整理汇总了PHP中Admin::getModels方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin::getModels方法的具体用法?PHP Admin::getModels怎么用?PHP Admin::getModels使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin
的用法示例。
在下文中一共展示了Admin::getModels方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getNavigation
/**
* Return a list of models grouped by plugin, to use in the navigation menu.
*
* @return array
*/
public function getNavigation()
{
$plugins = Admin::getModels();
$navigation = array();
foreach ($plugins as $plugin) {
$models = array();
foreach ($plugin['models'] as $model) {
if ($model['installed']) {
$models[Inflector::humanize($model['group'])][] = $model;
}
}
$navigation[$plugin['title']] = $models;
}
return $navigation;
}
示例2: actionIndex
public function actionIndex()
{
$sliders = Admin::getModels("SliderModel");
$this->view("admin/slider/list", array("sliders" => $sliders), false);
}
示例3: actionIndex
public function actionIndex()
{
$cats = Admin::getModels("CatsModel");
$this->view("admin/cats/list", array("cats" => $cats), false);
}
示例4: models
/**
* Analyze all models and output important information.
*/
public function models()
{
$this->set('plugins', Admin::getModels());
}
示例5: actionIndex
public function actionIndex()
{
$abonements = Admin::getModels("AbonemModel");
$this->view("admin/abonements/list", array("abonements" => $abonements), false);
}