• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Kwc_Admin类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Kwc_Admin的典型用法代码示例。如果您正苦于以下问题:PHP Kwc_Admin类的具体用法?PHP Kwc_Admin怎么用?PHP Kwc_Admin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Kwc_Admin类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getTemplateVars

 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['paypalButton'] = $this->_getPaypalButton();
     $ret['options'] = array('controllerUrl' => Kwc_Admin::getInstance($this->getData()->componentClass)->getControllerUrl() . '/json-confirm-order', 'params' => array('paymentComponentId' => $this->getData()->parent->componentId));
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例2: indexAction

 public function indexAction()
 {
     parent::indexAction();
     $cfg = Kwc_Admin::getInstance($this->_getParam('class'))->getExtConfig();
     $this->view->assign($cfg['grid']);
     unset($this->view->title);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:VouchersController.php


示例3: load

 public function load($row, array $info = array())
 {
     $gen = Kwf_Component_Generator_Abstract::getInstance($this->_componentClass, $this->_generatorKey);
     $edit = Kwf_Component_Abstract_ExtConfig_Abstract::getEditConfigs($this->_getComponentClassByRow($row), $gen, '{componentId}-{0}', '');
     $this->_componentConfigs = array_merge($this->_componentConfigs, $edit['componentConfigs']);
     $ret = $edit['contentEditComponents'];
     $g = Kwc_Abstract::getSetting($this->_componentClass, 'generators');
     if (isset($g['detail']['dbIdShortcut'])) {
         $dbId = $g['detail']['dbIdShortcut'] . $row->id;
     } else {
         $dbId = $row->component_id . $gen->getIdSeparator() . $row->id;
     }
     $components = Kwf_Component_Data_Root::getInstance()->getComponentsByDbId($dbId, array('ignoreVisible' => true));
     if (isset($components[0])) {
         foreach (Kwf_Controller_Action_Component_PagesController::getSharedComponents($components[0]) as $cls => $cmp) {
             $cfg = Kwc_Admin::getInstance($cls)->getExtConfig(Kwf_Component_Abstract_ExtConfig_Abstract::TYPE_SHARED);
             foreach ($cfg as $k => $c) {
                 if (!isset($this->_componentConfigs[$cls . '-' . $k])) {
                     $this->_componentConfigs[$cls . '-' . $k] = $c;
                 }
                 $ret[] = array('componentClass' => $cls, 'type' => $k, 'idTemplate' => '{componentId}-{0}', 'componentIdSuffix' => '');
             }
         }
     }
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:26,代码来源:EditComponents.php


示例4: addResources

 public function addResources(Kwf_Acl $acl)
 {
     parent::addResources($acl);
     $name = Kwc_Abstract::getSetting($this->_class, 'componentName');
     $icon = Kwc_Abstract::getSetting($this->_class, 'componentIcon');
     $acl->add(new Kwf_Acl_Resource_ComponentClass_MenuUrl($this->_class, array('text' => $name, 'icon' => $icon), Kwc_Admin::getInstance($this->_class)->getControllerUrl()), 'kwf_component_root');
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:MenuConfig.php


示例5: _initColumns

 protected function _initColumns()
 {
     $this->_columns->add(new Kwf_Grid_Column('id'));
     $this->_columns->add(new Kwf_Grid_Column('name'));
     if ($this->_getParam('id')) {
         $subRootComponentId = $this->_getParam('id');
     } else {
         if ($this->_getParam('parent_id')) {
             $subRootComponentId = $this->_getParam('parent_id');
         } else {
             if ($this->_getParam('componentId')) {
                 $subRootComponentId = $this->_getParam('componentId');
             } else {
                 throw new Kwf_Exception("componentId, id or parent_id required");
             }
         }
     }
     $data = array();
     $gen = Kwc_Abstract::getSetting($this->_getParam('class'), 'generators');
     foreach ($gen['child']['component'] as $name => $class) {
         if (!$class) {
             continue;
         }
         $admin = Kwc_Admin::getInstance($class);
         $forms = $admin->getCardForms();
         foreach ($admin->getVisibleCardForms($subRootComponentId) as $k) {
             $id = count($forms) == 1 ? $name : $name . '_' . $k;
             $data[] = array('id' => $id, 'name' => $forms[$k]['title']);
         }
     }
     $this->_model = new Kwf_Model_FnF(array('data' => $data));
     parent::_initColumns();
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:33,代码来源:ComponentsController.php


示例6: addResources

 public function addResources(Kwf_Acl $acl)
 {
     if (!$acl->has('kwc_shop')) {
         $acl->add(new Kwf_Acl_Resource_MenuDropdown('kwc_shop', array('text' => trlKwfStatic('Shop'), 'icon' => 'cart.png')), 'kwf_component_root');
     }
     $acl->add(new Kwf_Acl_Resource_ComponentClass_MenuUrl($this->_class, array('text' => trlKwfStatic('Vouchers'), 'icon' => 'application_view_list.png'), Kwc_Admin::getInstance($this->_class)->getControllerUrl('Vouchers')), 'kwc_shop');
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:MenuConfig.php


示例7: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['wirecardButton'] = $this->_getWirecardButton();
     $ret['options'] = array('controllerUrl' => Kwc_Admin::getInstance(get_class($this))->getControllerUrl() . '/json-confirm-order', 'params' => array('paymentComponentId' => $this->getData()->parent->componentId));
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例8: getComponentsDependingOnRow

 public function getComponentsDependingOnRow()
 {
     $ret = array();
     foreach (Kwc_Admin::getDependsOnRowInstances() as $a) {
         foreach ($a->getComponentsDependingOnRow($this) as $i) {
             if ($i) {
                 $ret[] = $i;
             }
         }
     }
     //unterseiten
     foreach ($this->getChildNodes() as $c) {
         $ret = array_merge($ret, $c->getComponentsDependingOnRow());
     }
     //rekursive links ignorieren
     foreach ($ret as $k => $r) {
         while ($r) {
             if ($r->componentId == $this->id) {
                 unset($ret[$k]);
                 break;
             }
             $r = $r->parent;
         }
     }
     return array_values($ret);
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:26,代码来源:GeneratorRow.php


示例9: preDispatch

 public function preDispatch()
 {
     $this->setModel(new Kwc_Directories_Item_Directory_Trl_AdminModel(array('proxyModel' => Kwc_Abstract::createChildModel(Kwc_Abstract::getSetting($this->_getParam('class'), 'masterComponentClass')), 'trlModel' => Kwc_Abstract::createChildModel($this->_getParam('class')))));
     parent::preDispatch();
     $url = Kwc_Admin::getInstance($this->_getParam('class'))->getControllerUrl('Form');
     $this->_editDialog['controllerUrl'] = $url;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Controller.php


示例10: _getConfig

 protected function _getConfig()
 {
     $classes = Kwc_Abstract::getChildComponentClasses($this->_class, 'child');
     $config = $this->_getStandardConfig('kwf.tabpanel', null);
     $config['activeTab'] = 0;
     $titles = array();
     foreach ($classes as $id => $cls) {
         $c = array_values(Kwc_Admin::getInstance($cls)->getExtConfig());
         foreach ($c as $i) {
             //TODO: hier nicht den titel als index verwenden, das stinkt
             $componentIdSuffix = '-' . $id;
             if (isset($i['componentIdSuffix'])) {
                 $componentIdSuffix .= $i['componentIdSuffix'];
             }
             $i['componentIdSuffix'] = $componentIdSuffix;
             if (!isset($titles[$i['title']])) {
                 $titles[$i['title']] = 0;
             }
             if ($titles[$i['title']]++ > 0) {
                 $i['title'] .= ' ' . $titles[$i['title']];
             }
             $config['tabs'][$i['title']] = $i;
         }
     }
     return array('tabs' => $config);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:26,代码来源:ExtConfigTabs.php


示例11: _delete

 protected function _delete()
 {
     $classes = Kwc_Abstract::getChildComponentClasses($this->getTable()->getComponentClass(), 'child');
     foreach ($classes as $k => $i) {
         Kwc_Admin::getInstance($i)->delete($this->component_id . '-' . $k);
     }
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Row.php


示例12: __construct

 public function __construct($resourceId, $menuConfig = null, $menuUrl = null, Kwf_Component_Data $component = null)
 {
     if ($resourceId instanceof Kwf_Component_Data) {
         $component = $resourceId;
         $resourceId = 'kwc_' . $component->dbId;
     } else {
         if (!$component) {
             throw new Kwf_Exception("component parameter is required");
         }
     }
     $this->_component = $component;
     if (!$menuConfig) {
         if (Kwc_Abstract::hasSetting($this->_class, 'componentNameShort')) {
             $name = Kwc_Abstract::getSetting($this->_class, 'componentNameShort');
         } else {
             $name = Kwc_Abstract::getSetting($this->_class, 'componentName');
         }
         $icon = Kwc_Abstract::getSetting($component->componentClass, 'componentIcon');
         $menuConfig = array('text' => trlKwfStatic('Edit {0}', $name), 'icon' => $icon);
     }
     if (!$menuUrl) {
         $menuUrl = Kwc_Admin::getInstance($component->componentClass)->getControllerUrl() . '?componentId=' . $component->dbId;
     }
     parent::__construct($resourceId, $menuConfig, $menuUrl);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:25,代码来源:MenuUrl.php


示例13: indexAction

 public function indexAction()
 {
     Kwf_Util_MemoryLimit::set(1024);
     set_time_limit(0);
     $source = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($this->_getParam('source'), array('ignoreVisible' => true));
     if (!$source) {
         throw new Kwf_Exception_Client("source not found");
     }
     $target = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($this->_getParam('target'), array('ignoreVisible' => true));
     if (!$target) {
         throw new Kwf_Exception_Client("target not found");
     }
     Kwf_Events_ModelObserver::getInstance()->disable();
     //This would be slow as hell. But luckily we can be sure that for the new (duplicated) components there will be no view cache to clear.
     Kwf_Registry::get('db')->beginTransaction();
     echo "counting pages...";
     $steps = Kwc_Admin::getInstance($source->componentClass)->getDuplicateProgressSteps($source);
     echo " " . $steps . "\n";
     $ad = new Zend_ProgressBar_Adapter_Console();
     $ad->setElements(array(Zend_ProgressBar_Adapter_Console::ELEMENT_BAR, Zend_ProgressBar_Adapter_Console::ELEMENT_TEXT, Zend_ProgressBar_Adapter_Console::ELEMENT_ETA));
     $progressBar = new Zend_ProgressBar($ad, 0, $steps);
     Kwc_Admin::getInstance($source->componentClass)->duplicate($source, $target, $progressBar);
     Kwf_Util_Component::afterDuplicate($source, $target);
     $progressBar->finish();
     Kwf_Registry::get('db')->commit();
     exit;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:27,代码来源:ComponentDeepCopyController.php


示例14: _getConfig

 protected function _getConfig()
 {
     $config = $this->_getStandardConfig('kwc.advanced.downloadstree');
     $config['projectsUrl'] = Kwc_Admin::getInstance($this->_class)->getControllerUrl('Projects');
     $config['projectUrl'] = Kwc_Admin::getInstance($this->_class)->getControllerUrl('Project');
     $config['downloadsUrl'] = Kwc_Admin::getInstance($this->_class)->getControllerUrl('Downloads');
     return array('customerarea' => $config);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:ExtConfig.php


示例15: _initColumns

 protected function _initColumns()
 {
     $this->_editDialog = array('controllerUrl' => Kwc_Admin::getInstance($this->_getParam('class'))->getControllerUrl('OrderProduct'), 'width' => 400, 'height' => 250);
     $this->_columns->add(new Kwf_Grid_Column('product', trlKwf('Product')))->setData(new Kwc_Shop_Cart_Checkout_ProductData_ProductText());
     $this->_columns->add(new Kwf_Grid_Column('amount', trlKwf('Amount'), 50))->setData(new Kwc_Shop_Cart_Checkout_ProductData_Amount());
     $this->_columns->add(new Kwf_Grid_Column('info', trlKwf('Info'), 150))->setData(new Kwc_Shop_Cart_Checkout_ProductData_Info());
     $this->_columns->add(new Kwf_Grid_Column('price', trlKwf('Price'), 50))->setData(new Kwc_Shop_Cart_Checkout_ProductData_Price())->setRenderer('money');
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:OrderProductsController.php


示例16: _getMasterClass

 protected function _getMasterClass($component)
 {
     $masterClass = Kwc_Admin::getComponentFile($component->componentClass, 'PdfMaster', 'php', true);
     if (!$masterClass) {
         $masterClass = 'Kwf_Pdf_TcPdf';
     }
     return $masterClass;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:ContentSender.php


示例17: indexAction

 public function indexAction()
 {
     $config = Kwc_Admin::getInstance($this->_getParam('class'))->getExtConfig();
     $config = $config['customerarea'];
     $config['baseParams']['componentId'] = $this->_getParam('componentId');
     $this->view->assign($config);
     $this->view->baseParams = array('componentId' => $this->_getParam('componentId'));
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Controller.php


示例18: _initColumns

 protected function _initColumns()
 {
     $c = Kwc_Abstract::getChildComponentClass($this->_getParam('class'), 'child');
     foreach (Kwc_Admin::getInstance($c)->gridColumns() as $i) {
         $this->_columns->add($i);
     }
     $this->_columns->add(new Kwf_Grid_Column_Visible());
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Controller.php


示例19: _initForm

 protected function _initForm()
 {
     $formClass = Kwc_Admin::getComponentClass($this, 'FrontendForm');
     $this->_form = new $formClass('form', $this->getData()->componentClass, null);
     if ($this->_recipient) {
         $this->_form->setId($this->_recipient->id);
     }
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Component.php


示例20: duplicated

 public static function duplicated(Kwf_Component_Data $source, Kwf_Component_Data $new)
 {
     $chained = Kwf_Component_Data_Root::getInstance()->getComponentsByClass('Kwc_Root_TrlRoot_Chained_Component', array('ignoreVisible' => true));
     //bySameClass wenn fkt nicht mehr static (todo oben erledigt)
     $sourceChained = array();
     foreach ($chained as $c) {
         $subRootAboveTrl = $c;
         //eg. domain
         while ($subRootAboveTrl = $subRootAboveTrl->parent) {
             if (Kwc_Abstract::getFlag($subRootAboveTrl->componentClass, 'subroot')) {
                 break;
             }
         }
         if (!$subRootAboveTrl) {
             $subRootAboveTrl = Kwf_Component_Data_Root::getInstance();
         }
         $d = $source;
         while ($d = $d->parent) {
             if ($d->componentId == $subRootAboveTrl->componentId) {
                 $sourceChained[$c->getLanguage()] = $c;
             }
         }
     }
     $targetChained = array();
     foreach ($chained as $c) {
         $subRootAboveTrl = $c;
         //eg. domain
         while ($subRootAboveTrl = $subRootAboveTrl->parent) {
             if (Kwc_Abstract::getFlag($subRootAboveTrl->componentClass, 'subroot')) {
                 break;
             }
         }
         if (!$subRootAboveTrl) {
             $subRootAboveTrl = Kwf_Component_Data_Root::getInstance();
         }
         $d = $new;
         while ($d = $d->parent) {
             if ($d->componentId == $subRootAboveTrl->componentId) {
                 if (isset($sourceChained[$c->getLanguage()])) {
                     //only if there is a source language
                     $targetChained[] = array('targetChained' => $c, 'sourceChained' => $sourceChained[$c->getLanguage()]);
                 }
             }
         }
     }
     foreach ($targetChained as $c) {
         $sourceChained = Kwc_Chained_Trl_Component::getChainedByMaster($source, $c['sourceChained'], array('ignoreVisible' => true));
         $newChained = Kwc_Chained_Trl_Component::getChainedByMaster($new, $c['targetChained'], array('ignoreVisible' => true));
         if (!$sourceChained || $source->componentId == $sourceChained->componentId) {
             continue;
             //wenn sourceChained nicht gefunden handelt es sich zB um ein MasterAsChild - was ignoriert werden muss
         }
         if (!$newChained) {
             throw new Kwf_Exception("can't find chained components");
         }
         Kwc_Admin::getInstance($newChained->componentClass)->duplicate($sourceChained, $newChained);
     }
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:58,代码来源:Admin.php



注:本文中的Kwc_Admin类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Kwc_Chained_Trl_Component类代码示例发布时间:2022-05-23
下一篇:
PHP Kwc_Abstract_Form类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap