Beispiel #1
0
 /**
  * Checks if the stage contains some component or a given component
  *
  * @param string $name the name of the component, eg. 'role', 'glossary', 'datafield_text' etc.
  * @param string $lang
  * @param mlang_version $version
  * @return bool
  */
 public function has_component($name = null, $lang = null, mlang_version $version = null)
 {
     if (is_null($name) and is_null($lang) and is_null($version)) {
         return !empty($this->components);
     } else {
         $cid = mlang_component::calculate_identifier($name, $lang, $version);
         return isset($this->components[$cid]);
     }
 }