本文整理汇总了PHP中Qdmvc::loadIndex方法的典型用法代码示例。如果您正苦于以下问题:PHP Qdmvc::loadIndex方法的具体用法?PHP Qdmvc::loadIndex怎么用?PHP Qdmvc::loadIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Qdmvc
的用法示例。
在下文中一共展示了Qdmvc::loadIndex方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadCustom
public static function loadCustom()
{
if (static::$custom_loaded === false) {
Qdmvc::loadIndex('messages/custom');
static::$msg = array_merge(static::$msg, Qdmvc_Message_Custom::$msg);
static::$msg2 = array_merge(static::$msg2, Qdmvc_Message_Custom::$msg2);
static::$custom_loaded = true;
}
}
示例2:
<?php
/**
* Created by PhpStorm.
* User: quocd_000
* Date: 05/03/2015
* Time: 11:49 PM
*/
Qdmvc::loadIndex('controllers/pages/index');
Qdmvc::loadIndex('controllers/dataports/index');
Qdmvc::loadIndex('controllers/menus/index');
示例3:
<?php
/**
* Created by PhpStorm.
* User: mac
* Date: 23/1/16
* Time: 9:27 PM
*/
Qdmvc::loadIndex('widgets/dashboard/plugins_info');
Qdmvc::loadIndex('widgets/dashboard/pages_info');
示例4: getIndex
<?php
/**
* Created by PhpStorm.
* User: quocd_000
* Date: 03/05/2015
* Time: 9:48 AM
*/
//load Custom menu
Qdmvc::loadIndex('controllers/menus/custom', false);
class Qdmvc_Page_IndexMenu
{
public static function getIndex()
{
return array_merge(static::getMenu());
}
private static function getMenuFolder()
{
return array('folder50' => array('ParentId' => -1, 'PageType' => 'Folder', 'Active' => true, 'Caption' => array('vi-VN' => 'Cấu hình & Cài đặt', 'en-US' => 'Setup & Options'), 'Order' => 10000), 'folder60' => array('ParentId' => 'folder50', 'PageType' => 'Folder', 'Active' => true, 'Caption' => array('vi-VN' => 'Phân quyền', 'en-US' => 'User Role'), 'Order' => 20000), 'folder70' => array('ParentId' => -1, 'PageType' => 'Folder', 'Active' => true, 'Caption' => array('vi-VN' => 'Hệ thống', 'en-US' => 'System'), 'Order' => 30000), 'folder110' => array('ParentId' => -1, 'PageType' => 'Folder', 'Active' => true, 'Caption' => array('vi-VN' => 'Khác', 'en-US' => 'Other'), 'Order' => 50000), 'folder140' => array('ParentId' => -1, 'PageType' => 'Folder', 'Active' => true, 'Caption' => array('vi-VN' => 'Báo cáo', 'en-US' => 'Reports'), 'Order' => 60000));
}
private static function getMenuOther()
{
return array('imggrp' => array('ParentId' => 'folder110', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_ImgGrp', 'Caption' => array('en-US' => 'Img Group', 'vi-VN' => 'Danh mục hình ảnh'), 'Model' => 'QdImgGrp', 'DataPort' => 'imggrp_port', 'PageList' => 'imggrp_list'), 'imggrp_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_ImgGrp_list', 'Caption' => array('en-US' => 'Img Group List', 'vi-VN' => 'Img Group List'), 'Model' => 'QdImgGrp', 'DataPort' => 'imggrp_port'), 'image' => array('ParentId' => 'imggrp', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_Image', 'Caption' => array('en-US' => 'Image', 'vi-VN' => 'Hình ảnh'), 'Model' => 'QdImage', 'DataPort' => 'image_port', 'PageList' => 'image_list'), 'image_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_Image_list', 'Caption' => array('en-US' => 'Image List', 'vi-VN' => 'Image List'), 'Model' => 'QdImage', 'DataPort' => 'image_port'), 'image_unused' => array('ParentId' => 'image', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_ImageUnused', 'Caption' => array('en-US' => 'Image (Unused)', 'vi-VN' => 'Hình ảnh (Rác)'), 'Model' => 'QdImage', 'DataPort' => 'image_port', 'PageList' => 'image_unused_list'), 'image_unused_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_ImageUnused_list', 'Caption' => array('en-US' => 'List', 'vi-VN' => 'List'), 'Model' => 'QdImage', 'DataPort' => 'image_port'), 'widgetnavcat' => array('ParentId' => 'folder110', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_WidgetNavCat', 'Caption' => array('en-US' => 'Widget Nav Cat', 'vi-VN' => 'Widget Nav Cat'), 'Model' => 'QdWidgetNavCat', 'DataPort' => 'widgetnavcat_port', 'PageList' => 'widgetnavcat_list'), 'widgetnavcat_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_WidgetNavCat_list', 'Caption' => array('en-US' => 'Widget Nav Cat List', 'vi-VN' => 'Widget Nav Cat List'), 'Model' => 'QdWidgetNavCat', 'DataPort' => 'widgetnavcat_port'), 'widgetnav' => array('ParentId' => 'widgetnavcat', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_WidgetNav', 'Caption' => array('en-US' => 'Widget Nav', 'vi-VN' => 'Widget Nav'), 'Model' => 'QdWidgetNav', 'DataPort' => 'widgetnav_port', 'PageList' => 'widgetnav_list'), 'widgetnav_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_WidgetNav_List', 'Caption' => array('en-US' => 'Widget Nav List', 'vi-VN' => 'Widget Nav List'), 'Model' => 'QdWidgetNav', 'DataPort' => 'widgetnav_port'));
}
private static function getMenuReport()
{
return array();
}
private static function getMenuSystem()
{
return array('qdmvcpage' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_QdmvcPage', 'Caption' => array('en-US' => 'Qdmvc Page', 'vi-VN' => 'Qdmvc Page'), 'Model' => 'QdQdmvcPage', 'DataPort' => 'qdmvcpage_port', 'PageList' => 'qdmvcpage_list'), 'qdmvcpage_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_QdmvcPage_List', 'Caption' => array('en-US' => 'User Personalization List', 'vi-VN' => 'User Personalization List'), 'Model' => 'QdQdmvcPage', 'DataPort' => 'qdmvcpage_port'), 'qdmvcmodel' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_QdmvcModel', 'Caption' => array('en-US' => 'Qdmvc Model', 'vi-VN' => 'Qdmvc Model'), 'Model' => 'QdQdmvcModel', 'DataPort' => 'qdmvcmodel_port', 'PageList' => 'qdmvcmodel_list'), 'qdmvcmodel_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_QdmvcModel_List', 'Caption' => array('en-US' => 'User Personalization List', 'vi-VN' => 'User Personalization List'), 'Model' => 'QdQdmvcModel', 'DataPort' => 'qdmvcmodel_port'), 'mytags' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_MyTags', 'Caption' => array('en-US' => 'My Tags', 'vi-VN' => 'My Tags'), 'Model' => 'QdMyTags', 'DataPort' => 'mytags_port', 'PageList' => 'mytags_list'), 'mytags_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_MyTags_List', 'Caption' => array('en-US' => 'List', 'vi-VN' => 'List'), 'Model' => 'QdMyTags', 'DataPort' => 'mytags_port'), 'setup_version' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_SetupVersion', 'Caption' => array('en-US' => 'Version', 'vi-VN' => 'Version'), 'Model' => 'QdVersion', 'DataPort' => 'version_port'), 'wpmenu' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_WpMenu', 'Caption' => array('en-US' => 'WP Menu', 'vi-VN' => 'WP Menu'), 'Model' => 'QdWpMenu', 'DataPort' => 'wpmenu_port', 'PageList' => 'wpmenu_list'), 'wpmenu_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_WpMenu_List', 'Caption' => array('en-US' => 'List', 'vi-VN' => 'List'), 'Model' => 'QdWpMenu', 'DataPort' => 'wpmenu_port'), 'menu' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_Menu', 'Caption' => array('en-US' => 'Main Menu', 'vi-VN' => 'Menu chính'), 'Model' => 'QdMenu', 'DataPort' => 'menu_port', 'PageList' => 'menu_list'), 'menu_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_Menu_list', 'Caption' => array('en-US' => 'Menu List', 'vi-VN' => 'Menu List'), 'Model' => 'QdMenu', 'DataPort' => 'menu_port'), 'note' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_Note', 'Caption' => array('en-US' => 'Note', 'vi-VN' => 'Ghi chú'), 'Model' => 'QdNote', 'DataPort' => 'note_port', 'PageList' => 'note_list'), 'note_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_Note_list', 'Caption' => array('en-US' => 'Note List', 'vi-VN' => 'Note List'), 'Model' => 'QdNote', 'DataPort' => 'note_port'), 'seometa' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_SEOMeta', 'Caption' => array('en-US' => 'SEO Meta', 'vi-VN' => 'SEO Meta'), 'Model' => 'QdSEOMeta', 'DataPort' => 'seometa_port', 'PageList' => 'seometa_list'), 'seometa_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_SEOMeta_list', 'Caption' => array('en-US' => 'SEOMeta List', 'vi-VN' => 'SEOMeta List'), 'Model' => 'QdSEOMeta', 'DataPort' => 'seometa_port'), 'log' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_Log', 'Caption' => array('en-US' => 'Log', 'vi-VN' => 'Log'), 'Model' => 'QdLog', 'DataPort' => 'log_port', 'PageList' => 'log_list'), 'log_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_Log_list', 'Caption' => array('en-US' => 'Log List', 'vi-VN' => 'Log List'), 'Model' => 'QdLog', 'DataPort' => 'log_port'), 'object_task' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_ObjectTask', 'Caption' => array('en-US' => 'Objects Version', 'vi-VN' => 'Objects Version'), 'Model' => 'QdObjectTask', 'DataPort' => 'object_task_port', 'PageList' => 'object_task_list'), 'object_task_list' => array('ParentId' => -1, 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_ObjectTask_list', 'Caption' => array('en-US' => 'List', 'vi-VN' => 'List'), 'Model' => 'QdObjectTask', 'DataPort' => 'object_task_port'), 'csdl' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Folder', 'Caption' => array('en-US' => 'CSDL Hành chính', 'vi-VN' => 'CSDL Hành chính')), 'vndistrict' => array('ParentId' => 'csdl', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_VnDistrict_Card', 'Caption' => array('en-US' => 'VnDistrict', 'vi-VN' => 'VnDistrict'), 'Model' => 'QdVnDistrict', 'DataPort' => 'vndistrict_port', 'PageList' => 'vndistrict_list'), 'vndistrict_list' => array('ParentId' => 'csdl', 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_VnDistrict_list', 'Caption' => array('en-US' => 'List', 'vi-VN' => 'List'), 'Model' => 'QdVnDistrict', 'DataPort' => 'vndistrict_port'), 'vnprovince' => array('ParentId' => 'csdl', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_VnProvince_Card', 'Caption' => array('en-US' => 'VnProvince', 'vi-VN' => 'VnProvince'), 'Model' => 'QdVnProvince', 'DataPort' => 'vnprovince_port', 'PageList' => 'vnprovince_list'), 'vnprovince_list' => array('ParentId' => 'csdl', 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_VnProvince_list', 'Caption' => array('en-US' => 'List', 'vi-VN' => 'List'), 'Model' => 'QdVnProvince', 'DataPort' => 'vnprovince_port'), 'vnward' => array('ParentId' => 'csdl', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_VnWard_Card', 'Caption' => array('en-US' => 'VnWard', 'vi-VN' => 'VnWard'), 'Model' => 'QdVnWard', 'DataPort' => 'vnward_port', 'PageList' => 'vnward_list'), 'vnward_list' => array('ParentId' => 'csdl', 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Page_VnWard_list', 'Caption' => array('en-US' => 'List', 'vi-VN' => 'List'), 'Model' => 'QdVnWard', 'DataPort' => 'vnward_port'), 'importdata' => array('ParentId' => 'folder70', 'Active' => true, 'PageType' => 'Card', 'Class' => 'Qdmvc_Page_ImportData', 'Caption' => array('en-US' => 'Import Data', 'vi-VN' => 'Import Data'), 'Model' => 'QdImportData', 'DataPort' => 'importdata_port', 'PageList' => 'importdata_list'), 'importdata_list' => array('ParentId' => 'folder70', 'Active' => false, 'PageType' => 'List', 'Class' => 'Qdmvc_Report_ImportData_List', 'Caption' => array('en-US' => 'List', 'vi-VN' => 'List'), 'Model' => 'QdImportData', 'DataPort' => 'importdata_port'));
示例5: run
public static function run()
{
//check dependency
require_once ABSPATH . 'wp-admin/includes/plugin.php';
foreach (static::$dependencies as $item) {
if (!is_plugin_active($item . "/{$item}.php")) {
//plugin is not activated
echo 'Qdmvc: require plugin ' . $item;
return;
}
}
//require global index
//Index must be loaded before Model
//Reason: QdRoot->getDefaultLookupPage
Qdmvc::loadIndex('index');
//Script and CSS
if (is_admin()) {
if (Qdmvc::IS_QDMVC_PAGE()) {
//register all jqwidget
QdJqwidgets::registerAll();
//load all jqwidget
QdJqwidgets::loadAll();
}
}
//load phpActiveRecord Model
Qdmvc::loadModel();
}