コード例 #1
0
ファイル: adminlib.php プロジェクト: raymondAntonio/moodle
 /**
  * Is setting related to query text - used when searching
  *
  * @param string $query
  * @return bool true if related, false if not
  */
 public function is_related($query)
 {
     if (!$this->load_choices() or empty($this->choices)) {
         return false;
     }
     if (parent::is_related($query)) {
         return true;
     }
     $textlib = textlib_get_instance();
     foreach ($this->choices as $desc) {
         if (strpos($textlib->strtolower($desc), $query) !== false) {
             return true;
         }
     }
     return false;
 }
コード例 #2
0
ファイル: adminlib.php プロジェクト: Alexbado/moodle2
 /**
  * Is setting related to query text - used when searching
  *
  * @param string $query
  * @return bool true if related, false if not
  */
 public function is_related($query)
 {
     if (!$this->load_choices() or empty($this->choices)) {
         return false;
     }
     if (parent::is_related($query)) {
         return true;
     }
     foreach ($this->choices as $desc) {
         if (strpos(core_text::strtolower($desc), $query) !== false) {
             return true;
         }
     }
     return false;
 }