當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Setting::getAllIdName方法代碼示例

本文整理匯總了PHP中app\models\Setting::getAllIdName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Setting::getAllIdName方法的具體用法?PHP Setting::getAllIdName怎麽用?PHP Setting::getAllIdName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\models\Setting的用法示例。


在下文中一共展示了Setting::getAllIdName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 public function init()
 {
     // actions
     // translate
     foreach ($this->actions as $actions => $name) {
         $this->actions[$actions] = Yii::t('app', $name);
     }
     // actions values
     $this->actions_values['taskdefined'] = TaskDefined::getAllIdName();
     $this->actions_values['setting'] = Setting::getAllIdName();
     $this->actions_values['rule'] = Rule::getAllIdName();
     $this->actions_values['rulevalue'] = RuleValue::getAllIdName();
     $this->actions_values['ruleextra'] = RuleExtra::getAllIdName();
     $this->actions_values['ruledate'] = RuleDate::getAllIdName();
     // values
     // translate
     foreach ($this->values as $values => $name) {
         $this->values[$values] = Yii::t('app', $name);
     }
     // values_values
     $this->values_values['taskdefined'] = TaskDefined::getAllIdName();
     $this->values_values['setting'] = Setting::getAllIdName();
     $this->values_values['rule'] = Rule::getAllIdName();
     $this->values_values['rulevalue'] = RuleValue::getAllIdName();
     $this->values_values['ruleextra'] = RuleExtra::getAllIdName();
     $this->values_values['ruledate'] = RuleDate::getAllIdName();
     //$this->values = array_merge($modelRule->values, $modelRule->actions);
     //$this->values_values = $modelRule->values;
     // create weights from 0 to 5
     for ($weight = 0; $weight <= 4; $weight++) {
         $this->weights[$weight] = $weight;
     }
     parent::init();
 }
開發者ID:hvos234,項目名稱:raspberrypi.home.website,代碼行數:34,代碼來源:RuleAction.php

示例2: init

 public function init()
 {
     // actions
     // translate
     foreach ($this->conditions as $conditions => $name) {
         $this->conditions[$conditions] = Yii::t('app', $name);
     }
     // actions values
     $this->conditions_values['taskdefined'] = TaskDefined::getAllIdName();
     $this->conditions_values['setting'] = Setting::getAllIdName();
     $this->conditions_values['rule'] = Rule::getAllIdName();
     $this->conditions_values['rulevalue'] = RuleValue::getAllIdName();
     $this->conditions_values['ruleextra'] = RuleExtra::getAllIdName();
     $this->conditions_values['ruledate'] = RuleDate::getAllIdName();
     // equations
     // translate all equations
     foreach ($this->equations as $key => $equation) {
         $this->equations[$key] = Yii::t('app', $equation);
     }
     // key before value equations
     foreach ($this->equations as $key => $equation) {
         $this->equations[$key] = $key . ', ' . $equation;
     }
     // values
     // translate
     foreach ($this->values as $values => $name) {
         $this->values[$values] = Yii::t('app', $name);
     }
     // values_values
     $this->values_values['taskdefined'] = TaskDefined::getAllIdName();
     $this->values_values['setting'] = Setting::getAllIdName();
     $this->values_values['rule'] = Rule::getAllIdName();
     $this->values_values['rulevalue'] = RuleValue::getAllIdName();
     $this->values_values['ruleextra'] = RuleExtra::getAllIdName();
     $this->values_values['ruledate'] = RuleDate::getAllIdName();
     // create weights from 0 to 10
     for ($weight = 0; $weight <= 10; $weight++) {
         $this->weights[$weight] = $weight;
     }
     parent::init();
 }
開發者ID:hvos234,項目名稱:raspberrypi.home.website,代碼行數:41,代碼來源:RuleCondition.php


注:本文中的app\models\Setting::getAllIdName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。