예제 #1
0
 /**
  * Returns the attributes to set for this block
  *
  * This function returns an array of HTML attributes for this block including
  * the defaults.
  * {@link block_tree::html_attributes()} is used to get the default arguments
  * and then we check whether the user has enabled hover expansion and add the
  * appropriate hover class if it has.
  *
  * @return array An array of HTML attributes
  */
 public function html_attributes()
 {
     $attributes = parent::html_attributes();
     if (!empty($this->config->enablehoverexpansion) && $this->config->enablehoverexpansion == 'yes') {
         $attributes['class'] .= ' block_js_expansion';
     }
     $attributes['class'] .= ' block_uai';
     return $attributes;
 }
 public function html_attributes()
 {
     $attributes = parent::html_attributes();
     // Get default values
     $attributes['class'] .= ' block_' . $this->name();
     // Append our class to class attribute
     return $attributes;
 }
예제 #3
0
 function html_attributes()
 {
     $attributes = parent::html_attributes();
     $attributes['class'] .= ' list_block';
     return $attributes;
 }
 public function html_attributes()
 {
     $attributes = parent::html_attributes();
     $attributes['class'] .= ' block_' . $this->name();
     return $attributes;
 }
예제 #5
0
 /**
  * Return an associative array of HTML attributes that will be given to your block's container element when Moodle constructs the output HTML.
  *
  * @return  array
  */
 public function html_attributes()
 {
     //pull the default attributes
     $attrs = parent::html_attributes();
     //add attributes
     // $attrs['width'] = '50%';
     return $attrs;
 }
예제 #6
0
 function html_attributes()
 {
     global $CFG;
     $attributes = parent::html_attributes();
     if (!empty($CFG->block_html_allowcssclasses)) {
         if (!empty($this->config->classes)) {
             $attributes['class'] .= ' ' . $this->config->classes;
         }
     }
     return $attributes;
 }