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


PHP admin_setting::is_related方法代碼示例

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


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

示例1: is_related

 /**
  * Checks if $query is one of the available subplugins.
  *
  * @param string $query The string to search for
  * @return bool Returns true if found, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     $subplugins = core_component::get_plugin_list('tinymce');
     foreach ($subplugins as $name => $dir) {
         if (stripos($name, $query) !== false) {
             return true;
         }
         $namestr = get_string('pluginname', 'tinymce_' . $name);
         if (strpos(core_text::strtolower($namestr), core_text::strtolower($query)) !== false) {
             return true;
         }
     }
     return false;
 }
開發者ID:evltuma,項目名稱:moodle,代碼行數:23,代碼來源:adminlib.php

示例2: is_related

 /**
  * Checks if $query is one of the available log plugins.
  *
  * @param string $query The string to search for
  * @return bool Returns true if found, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     $query = core_text::strtolower($query);
     $plugins = \tool_log\log\manager::get_store_plugins();
     foreach ($plugins as $plugin => $fulldir) {
         if (strpos(core_text::strtolower($plugin), $query) !== false) {
             return true;
         }
         $localised = get_string('pluginname', $plugin);
         if (strpos(core_text::strtolower($localised), $query) !== false) {
             return true;
         }
     }
     return false;
 }
開發者ID:pzhu2004,項目名稱:moodle,代碼行數:24,代碼來源:setting_managestores.php

示例3: is_related

 /**
  * Checks if $query is one of the available dataformfield plugins.
  *
  * @param string $query The string to search for
  * @return bool Returns true if found, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     $query = \core_text::strtolower($query);
     $plugins = \core_component::get_plugin_list('dataformfield');
     foreach ($plugins as $plugin => $fulldir) {
         if (strpos(\core_text::strtolower($plugin), $query) !== false) {
             return true;
         }
         $localised = get_string('pluginname', "dataformfield_{$plugin}");
         if (strpos(\core_text::strtolower($localised), $query) !== false) {
             return true;
         }
     }
     return false;
 }
開發者ID:parksandwildlife,項目名稱:learning,代碼行數:24,代碼來源:managedataformfield.php

示例4: is_related

 /**
  * Check if this is $query is related to a choice
  *
  * @param string $query
  * @return bool true if related, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     if (!$this->load_choices()) {
         return false;
     }
     foreach ($this->choices as $key => $value) {
         if (strpos(core_text::strtolower($key), $query) !== false) {
             return true;
         }
         if (strpos(core_text::strtolower($value), $query) !== false) {
             return true;
         }
     }
     return false;
 }
開發者ID:lucisgit,項目名稱:moodle-theme_essential,代碼行數:24,代碼來源:essential_admin_setting_configradio.php

示例5: is_related

 /**
  * Checks if $query is one of the available webservices
  *
  * @param string $query The string to search for
  * @return bool Returns true if found, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     $textlib = textlib_get_instance();
     $protocols = get_plugin_list('webservice');
     foreach ($protocols as $protocol => $location) {
         if (strpos($protocol, $query) !== false) {
             return true;
         }
         $protocolstr = get_string('pluginname', 'webservice_' . $protocol);
         if (strpos($textlib->strtolower($protocolstr), $query) !== false) {
             return true;
         }
     }
     return false;
 }
開發者ID:raymondAntonio,項目名稱:moodle,代碼行數:24,代碼來源:adminlib.php

示例6: is_related

 /**
  * Checks if $query is one of the available webservices
  *
  * @param string $query The string to search for
  * @return bool Returns true if found, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     $protocols = core_component::get_plugin_list('webservice');
     foreach ($protocols as $protocol => $location) {
         if (strpos($protocol, $query) !== false) {
             return true;
         }
         $protocolstr = get_string('pluginname', 'webservice_' . $protocol);
         if (strpos(core_text::strtolower($protocolstr), $query) !== false) {
             return true;
         }
     }
     return false;
 }
開發者ID:Alexbado,項目名稱:moodle2,代碼行數:23,代碼來源:adminlib.php

示例7: is_related

 /**
  * Searches repository plugins for one that matches $query
  *
  * @param string $query The string to search for
  * @return bool true if found, false if not
  */
 public function is_related($query)
 {
     if (parent::is_related($query)) {
         return true;
     }
     $textlib = textlib_get_instance();
     $repositories = get_plugin_list('repository');
     foreach ($repositories as $p => $dir) {
         if (strpos($p, $query) !== false) {
             return true;
         }
     }
     foreach (repository::get_types() as $instance) {
         $title = $instance->get_typename();
         if (strpos($textlib->strtolower($title), $query) !== false) {
             return true;
         }
     }
     return false;
 }
開發者ID:ajv,項目名稱:Offline-Caching,代碼行數:26,代碼來源:adminlib.php


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