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

PHP Kwc_Abstract类代码示例

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

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



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

示例1: _getAllLanguages

 private function _getAllLanguages()
 {
     $config = Zend_Registry::get('config');
     $langs = array();
     if ($config->webCodeLanguage) {
         $langs[] = $config->webCodeLanguage;
     }
     if ($config->languages) {
         foreach ($config->languages as $lang => $name) {
             $langs[] = $lang;
         }
     }
     if (Kwf_Component_Data_Root::getComponentClass()) {
         foreach (Kwc_Abstract::getComponentClasses() as $c) {
             if (Kwc_Abstract::getFlag($c, 'hasAvailableLanguages')) {
                 foreach (call_user_func(array($c, 'getAvailableLanguages'), $c) as $i) {
                     if (!in_array($i, $langs)) {
                         $langs[] = $i;
                     }
                 }
             }
         }
     }
     $langs = array_unique($langs);
     return $langs;
 }
开发者ID:nsams,项目名称:koala-framework,代码行数:26,代码来源:Assets.php


示例2: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $feeds = Kwf_Component_Data_Root::getInstance()->getComponentsByClass('Kwc_Abstract_Feed_Component', array('subroot' => $this->getData()));
     $ret['feeds'] = $feeds;
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例3: getAllChainedByMasterFromChainedStart

 public static function getAllChainedByMasterFromChainedStart($componentClass, $master, $chainedType, $parentDataSelect = array())
 {
     if (Kwc_Abstract::getFlag($componentClass, 'chainedType') != $chainedType) {
         return array();
     }
     $ret = array();
     foreach (Kwf_Component_Data_Root::getInstance()->getComponentsByClass($componentClass, $parentDataSelect) as $chainedStart) {
         //if additional subroots are above trl subroot (eg. domains)
         if ($sr = $chainedStart->parent->getSubroot()) {
             $masterSr = $master;
             while (Kwc_Abstract::getFlag($masterSr->componentClass, 'chainedType') != $chainedType) {
                 $masterSr = $masterSr->parent;
                 if (!$masterSr) {
                     continue 2;
                 }
             }
             if ($masterSr->parent && $sr != $masterSr->parent->getSubroot()) {
                 continue;
             }
         }
         $i = Kwc_Chained_Abstract_Component::getChainedByMaster($master, $chainedStart, $chainedType, $parentDataSelect);
         if ($i) {
             $ret[] = $i;
         }
     }
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:27,代码来源:Component.php


示例4: componentWithMaster

 public function componentWithMaster(array $componentWithMaster)
 {
     $last = array_pop($componentWithMaster);
     $component = $last['data'];
     if ($last['type'] == 'master') {
         $innerComponent = $componentWithMaster[0]['data'];
         $vars = $component->getComponent()->getMasterTemplateVars($innerComponent, $this->_getRenderer());
         $vars['componentWithMaster'] = $componentWithMaster;
         if (Kwc_Abstract::hasSetting($component->componentClass, 'masterTemplate')) {
             $masterTemplate = Kwc_Abstract::getSetting($component->componentClass, 'masterTemplate');
         } else {
             $masterTemplate = $this->_getRenderer()->getTemplate($component, 'Master');
         }
         if (substr($masterTemplate, -4) == '.tpl') {
             $view = new Kwf_Component_View($this->_getRenderer());
             $view->assign($vars);
             $ret = $view->render($masterTemplate);
         } else {
             $twig = new Kwf_Component_Renderer_Twig_Environment($this->_getRenderer());
             $ret = $twig->render($masterTemplate, $vars);
         }
         $ret = $this->_replaceKwfUp($ret);
         return $ret;
     } else {
         if ($last['type'] == 'component') {
             $helper = new Kwf_Component_View_Helper_Component();
             $helper->setRenderer($this->_getRenderer());
             return '<div class="kwfMainContent">' . "\n    " . $helper->component($component) . "\n" . '</div>' . "\n";
         } else {
             throw new Kwf_Exception("invalid type");
         }
     }
 }
开发者ID:nsams,项目名称:koala-framework,代码行数:33,代码来源:ComponentWithMaster.php


示例5: sendContent

 public function sendContent($includeMaster)
 {
     $data = $this->_data->getChildComponent('-child');
     $contentSender = Kwc_Abstract::getSetting($data->componentClass, 'contentSender');
     $contentSender = new $contentSender($data);
     $contentSender->sendContent($includeMaster);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:ContentSender.php


示例6: _initFields

 protected function _initFields()
 {
     $modelName = Kwc_Abstract::getSetting($this->_getParam('class'), 'projectsModel');
     $this->_form->setModel(Kwf_Model_Abstract::getInstance($modelName));
     $this->_form->add(new Kwf_Form_Field_TextField('text', trlKwf('Text')));
     $this->_form->add(new Kwf_Form_Field_Checkbox('visible', trlKwf('Visible')));
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:ProjectController.php


示例7: _initFields

 protected function _initFields()
 {
     parent::_initFields();
     $showDirectoryClass = Kwc_Abstract::getSetting($this->getClass(), 'showDirectoryClass');
     $hideDirectoryClasses = Kwc_Abstract::getSetting($this->getClass(), 'hideDirectoryClasses');
     $cards = $this->add(new Kwf_Form_Container_Cards('source_component_id', trlKwf('Directory')));
     $defaultCard = null;
     $categories = Kwf_Component_Data_Root::getInstance()->getComponentsByClass('Kwc_Directories_Category_Directory_Component');
     foreach ($categories as $category) {
         $itemDirectory = $category->parent;
         if (is_instance_of($itemDirectory->componentClass, $showDirectoryClass)) {
             foreach ($hideDirectoryClasses as $c) {
                 if (is_instance_of($itemDirectory->componentClass, $c)) {
                     continue 2;
                 }
             }
             $categoriesModel = $category->getComponent()->getChildModel();
             $select = $categoriesModel->select()->whereEquals('component_id', $category->componentId);
             $values = array();
             foreach ($categoriesModel->getRows($select) as $row) {
                 $values[$row->id] = $row->name;
             }
             $card = $cards->add();
             $card->setTitle($category->parent->getTitle());
             $card->setName($category->componentId);
             if (!$defaultCard) {
                 $defaultCard = $category->componentId;
             }
             $model = Kwf_Model_Abstract::getInstance('Kwc_Directories_Category_ShowCategories_Model');
             $card->add(new Kwf_Form_Field_MultiCheckboxLegacy($model, trlKwf('Categories')))->setValues($values)->setReferences(array('columns' => array('component_id'), 'refColumns' => array('id')))->setColumnName('category_id');
         }
     }
     $cards->setDefaultValue($defaultCard);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:34,代码来源:Form.php


示例8: validateSettings

 public static function validateSettings($settings, $componentClass)
 {
     parent::validateSettings($settings, $componentClass);
     if (Kwc_Abstract::hasSetting($componentClass, 'dimensions')) {
         throw new Kwf_Exception("Setting 'dimensions' must NOT exist");
     }
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例9: getInstance

 /**
  * Returns Zend_Search_Lucene instance for given subroot
  *
  * every subroot has it's own instance
  *
  * @param Kwf_Component_Data for this index
  * @return Zend_Search_Lucene_Interface
  */
 public static function getInstance(Kwf_Component_Data $subroot)
 {
     while ($subroot) {
         if (Kwc_Abstract::getFlag($subroot->componentClass, 'subroot')) {
             break;
         }
         $subroot = $subroot->parent;
     }
     if (!$subroot) {
         $subroot = Kwf_Component_Data_Root::getInstance();
     }
     static $instance = array();
     if (!isset($instance[$subroot->componentId])) {
         $analyzer = new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num_CaseInsensitive();
         $analyzer->addFilter(new Zend_Search_Lucene_Analysis_TokenFilter_ShortWords(2));
         //$stopWords = explode(' ', 'der dir das einer eine ein und oder doch ist sind an in vor nicht wir ihr sie es ich');
         //$analyzer->addFilter(new Zend_Search_Lucene_Analysis_TokenFilter_StopWords($stopWords));
         Zend_Search_Lucene_Analysis_Analyzer::setDefault($analyzer);
         Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding('utf-8');
         Zend_Search_Lucene_Storage_Directory_Filesystem::setDefaultFilePermissions(0666);
         $path = 'cache/fulltext';
         $path .= '/' . $subroot->componentId;
         try {
             $instance[$subroot->componentId] = Zend_Search_Lucene::open($path);
         } catch (Zend_Search_Lucene_Exception $e) {
             $instance[$subroot->componentId] = Zend_Search_Lucene::create($path);
         }
     }
     return $instance[$subroot->componentId];
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:38,代码来源:Lucene.php


示例10: alterBackendOrderForm

 public function alterBackendOrderForm(Kwc_Shop_AddToCartAbstract_FrontendForm $form)
 {
     $component = null;
     foreach (Kwc_Abstract::getComponentClasses() as $c) {
         if (is_instance_of($c, 'Kwc_Shop_Products_Directory_Component')) {
             $detailClasses = Kwc_Abstract::getChildComponentClasses($c, 'detail');
             foreach ($detailClasses as $key => $class) {
                 if (Kwc_Abstract::getChildComponentClass($class, 'addToCart') == $this->_class) {
                     $component = $key;
                 }
             }
         }
     }
     $m = Kwf_Model_Abstract::getInstance('Kwc_Shop_Products');
     $s = $m->select();
     $s->whereEquals('visible', 1);
     if ($component) {
         $s->whereEquals('component', $component);
     }
     $s->order('pos');
     $data = array();
     foreach ($m->getRows($s) as $product) {
         $data[] = array($product->current_price_id, $product->__toString() . ' (' . $product->current_price . ' €)');
     }
     $form->prepend(new Kwf_Form_Field_Select('shop_product_price_id', trlKwfStatic('Product')))->setValues($data)->setAllowBlank(false);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:26,代码来源:OrderProductData.php


示例11: processIpn

 public function processIpn(Kwc_Shop_Cart_Checkout_Payment_Wirecard_LogRow $row, $param)
 {
     if ($row->paymentState == 'SUCCESS' || $row->paymentState == 'PENDING') {
         $order = Kwf_Model_Abstract::getInstance(Kwc_Abstract::getSetting($this->getData()->parent->parent->componentClass, 'childModel'))->getReferencedModel('Order')->getRow($param['orderId']);
         if (!$order) {
             throw new Kwf_Exception("Order not found!");
         }
         $order->payment_component_id = $this->getData()->componentId;
         $order->checkout_component_id = $this->getData()->parent->componentId;
         $order->cart_component_class = $this->getData()->parent->parent->componentClass;
         if ($row->paymentState == 'SUCCESS') {
             $order->status = 'payed';
             $order->payed = date('Y-m-d H:i:s');
         }
         if (!$order->confirm_mail_sent) {
             foreach ($this->getData()->parent->parent->getComponent()->getShopCartPlugins() as $p) {
                 $p->orderConfirmed($order);
             }
             foreach ($order->getChildRows('Products') as $p) {
                 $addComponent = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($p->add_component_id);
                 $addComponent->getComponent()->orderConfirmed($p);
             }
             $this->sendConfirmMail($order);
             $order->date = date('Y-m-d H:i:s');
             $order->confirm_mail_sent = date('Y-m-d H:i:s');
         }
         $order->save();
         return true;
     } else {
         throw new Kwf_Exception('Error by processing ipn');
     }
     return false;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:33,代码来源:Component.php


示例12: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $page = $this->getData()->getPage();
     $ret['childPages'] = $page->getChildPages();
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例13: getSettings

 public static function getSettings()
 {
     $ret = parent::getSettings();
     $ret['flags']['foo'] = true;
     $ret['generators']['test'] = array('class' => 'Kwf_Component_Generator_Static', 'component' => 'Kwf_Component_Generator_Indirect_Flag2');
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Flag.php


示例14: getTemplateVarsWithNetworks

 public function getTemplateVarsWithNetworks($currentPage)
 {
     $ret = parent::getTemplateVars();
     $ret['networks'] = $this->_getNetworks($currentPage);
     $ret['iconSet'] = $this->_getSetting('iconSet');
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例15: getSettings

 public static function getSettings($param = null)
 {
     $ret = parent::getSettings($param);
     $ret['componentName'] = 'Foo';
     $ret['ownModel'] = new Kwf_Model_FnF(array('primaryKey' => 'component_id'));
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例16: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['componentClass'] = get_class($this);
     $ret['test2'] = $this->getData()->getChildComponent('_test2');
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例17: getSettings

 public static function getSettings($param = null)
 {
     $ret = parent::getSettings($param);
     $ret['generators']['test'] = array('class' => 'Kwf_Component_Generator_Page_Static', 'component' => 'Kwc_Lightbox_Content_TestComponent_Component');
     $ret['viewCache'] = false;
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例18: getSettings

 public static function getSettings()
 {
     $ret = parent::getSettings();
     $ret['generators']['composite'] = array('class' => 'Kwf_Component_Generator_Page_Static', 'component' => 'Kwc_Cc_Composite_Master_Composite_Component');
     $ret['flags']['chainedType'] = 'Cc';
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例19: getSettings

 public static function getSettings($param = null)
 {
     $ret = parent::getSettings($param);
     $ret['rootElementClass'] = 'kwfUp-webStandard';
     $ret['flags']['noIndex'] = true;
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例20: getTemplateVars

 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer = null)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['test2'] = $this->getData()->parent->getChildComponent('_test2');
     $ret['test3'] = $this->getData()->parent->getChildComponent('_test3');
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Kwc_Abstract_Composite_Component类代码示例发布时间:2022-05-23
下一篇:
PHP Kurogo类代码示例发布时间: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