本文整理汇总了PHP中Qdmvc类的典型用法代码示例。如果您正苦于以下问题:PHP Qdmvc类的具体用法?PHP Qdmvc怎么用?PHP Qdmvc使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Qdmvc类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: qd_wpse9870_parse_request
function qd_wpse9870_parse_request(&$wp)
{
if (array_key_exists('qd-api', $wp->query_vars)) {
Qdmvc::runDataPort($wp->query_vars['qd-api']);
exit(0);
}
return;
}
示例2: 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;
}
}
示例3: run3
public function run3()
{
Qdmvc::loadHelper('class.Diff');
$diff = Diff::compare('Ngay do', 'Ngay mua', true);
echo Diff::toHTML($diff, '');
return;
foreach ($diff as $item) {
if ($item[1] == Diff::DELETED) {
echo $item[0];
}
}
echo '<br>';
foreach ($diff as $item) {
if ($item[1] == Diff::INSERTED) {
echo $item[0];
}
}
?>
<?php
}
示例4: fn_genfromfolder
public function fn_genfromfolder($location, $params)
{
$folder = Qdmvc::getPluginDir('controllers/pages');
$count = 0;
foreach (glob("{$folder}/*") as $file) {
if ($count == 0) {
QdQdmvcPage::delete_all();
}
if (is_dir($file)) {
$folder_name = basename($file);
if (QdQdmvcPage::GET($folder_name) == null) {
$tmp = new QdQdmvcPage();
$tmp->id = $folder_name;
if ($tmp->save()) {
$count++;
}
}
}
}
$this->pushValidateError('', sprintf('Total items: %s', $count), 'info');
return true;
}
示例5: fn_genfromfolder
public function fn_genfromfolder($location, $params)
{
$folder = Qdmvc::getPluginDir('models');
$count = 0;
$t = glob("{$folder}/*");
foreach (glob("{$folder}/*") as $file) {
if ($count == 0) {
QdQdmvcModel::delete_all();
}
if (is_file($file)) {
$file_name = basename($file);
$file_name = str_replace(".php", "", $file_name);
if (QdQdmvcModel::GET($file_name) == null) {
$tmp = new QdQdmvcModel();
$tmp->id = $file_name;
if ($tmp->save()) {
$count++;
}
}
}
}
$this->pushValidateError('', sprintf('Total items: %s', $count), 'info');
return true;
}
示例6:
<?php
Qdmvc::loadIndex('widgets/dashboard/index');
示例7: render
<?php
/**
* Created by PhpStorm.
* User: quocd_000
* Date: 09/03/2015
* Time: 7:08 PM
*/
Qdmvc::loadLayout('layout_root');
class Qdmvc_Layout_Navigation extends Qdmvc_Layout_Root
{
function __construct($page)
{
parent::__construct($page);
$this->data['view_style'] = 'compact';
// Moved to qdmvc because of files caches
//jquery ui
QdJqwidgets::loadSinglePluginJS('jquery-ui/jquery-ui.js', false);
QdJqwidgets::loadSinglePluginCSS('jquery-ui/jquery-ui.css', false);
//jquery fancytree
QdJqwidgets::loadSinglePluginJS('fancytree/jquery.fancytree.js', false);
QdJqwidgets::loadSinglePluginJS('fancytree/jquery.fancytree.filter.js', false);
QdJqwidgets::loadSinglePluginCSS('fancytree/ui.fancytree.css', false);
//underscore
QdJqwidgets::loadSinglePluginJS('underscore-min.js', false);
}
public function render()
{
$this->style();
parent::render();
$this->onReadyHook();
示例8:
<?php
/**
* Created by PhpStorm.
* User: quocd_000
* Date: 08/02/2015
* Time: 11:32 PM
*/
Qdmvc::loadPageView('root_setup');
class Qdmvc_View_TRootSetup extends Qdmvc_View_RootSetup
{
}
示例9: getCustomPageView
<?php
/**
* Created by PhpStorm.
* User: quocd_000
* Date: 05/03/2015
* Time: 11:35 PM
*/
Qdmvc::loadPage('postcat_list');
class Qdmvc_Page_ImgGrp_List extends Qdmvc_Page_PostCat_List
{
protected function getCustomPageView()
{
return array('type' => QdPostCat::$TYPE_IMGGRP);
}
protected static function getViewClass()
{
return 'Qdmvc_View_ImgGrp_List';
}
public static function getPage()
{
return 'imggrp_list';
}
protected static function initFields()
{
$obj = array_merge(parent::initFields(), array('description' => array('Order' => 70)));
unset($obj['parent_id']);
return $obj;
}
}
示例10: 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'));
示例11: serverFunctions
<?php
/**
* Created by PhpStorm.
* User: quocd_000
* Date: 08/02/2015
* Time: 11:32 PM
*/
Qdmvc::loadPageView('image');
class Qdmvc_View_ImageUnused extends Qdmvc_View_Image
{
protected function serverFunctions()
{
$obj = parent::serverFunctions();
$obj = array_merge($obj, array('btn_get_unused' => array('fn_name' => 'fn_get_unused', 'label' => array('vi-VN' => 'Lọc hình rác', 'en-US' => 'Get Unused Image'))));
return $obj;
}
}
示例12: getPageListURL
<?php
/**
* Created by PhpStorm.
* User: quocd_000
* Date: 08/02/2015
* Time: 11:32 PM
*/
Qdmvc::loadLayout('layout_card');
class Qdmvc_Layout_CardNavigate extends Qdmvc_Layout_Card
{
protected function getPageListURL()
{
$c = $this->page;
return $c->getPageListURL();
}
protected function callFnAction()
{
?>
<script>
MYAPP.callFn = function (fn_name, params, on_done_fn, on_fail_fn, on_final_fn, passing_obj) {
(function ($) {
//get Grid
var gridf = MYAPP.getGridFrame();
var grid = gridf.MYAPP.getGrid();
var msg_confirm = '<?php
echo Qdmvc_Message::getMsg('msg_confirm_callfn');
?>
';
if (gridf.MYAPP.isMultiSelection()) {
示例13:
<?php
/**
* Created by PhpStorm.
* User: quocd_000
* Date: 20/03/2015
* Time: 10:03 PM
*/
Qdmvc::loadDataPort('note_port');
class Qdmvc_DataPort_Image extends Qdmvc_DataPort_Note
{
protected static $model = 'QdImage';
}
示例14: loadView
protected function loadView($name = 'view')
{
Qdmvc::loadController('/pages/' . static::getPage() . '/' . $name);
}
示例15: getViewClass
<?php
/**
* Created by PhpStorm.
* User: quocd_000
* Date: 05/03/2015
* Time: 11:36 PM
*/
Qdmvc::loadPage('image');
class Qdmvc_Page_ImageUnused extends Qdmvc_Page_Image
{
protected static function getViewClass()
{
return 'Qdmvc_View_ImageUnused';
}
public static function getPage()
{
return 'image_unused';
}
protected static function initFields()
{
return array('Group1' => array('Type' => 'Group', 'Name' => 'General', 'Fields' => array('id' => array('Order' => 10, 'Hidden' => true), 'type' => array('Order' => 25), 'path' => array('Order' => 20), '_path_preview' => array('Order' => 5))));
}
}