Exemplo n.º 1
0
 /**
  * Magic method getter, redirects to read only values.
  *
  * For block plugins pretends the object has 'visible' property for compatibility
  * with plugins developed for Moodle version below 2.4
  *
  * @param string $name
  * @return mixed
  */
 public function __get($name)
 {
     if ($name === 'visible') {
         debugging('This is now an instance of plugininfo_block, please use $block->is_enabled() instead of $block->visible', DEBUG_DEVELOPER);
         return $this->is_enabled() !== false;
     }
     return parent::__get($name);
 }