/**
  * Set this as the active or inactive transformer.
  * @param MUNGER $munger The activation context.
  * @param boolean $value True if the transformer is being activated.
  * @param MUNGER_TOKEN $token Token that caused the activation.
  */
 public function activate($munger, $value, $token)
 {
     parent::activate($munger, $value, $token);
     if ($value) {
         $munger->increase_indent_by($this->spaces_to_indent);
     } else {
         $munger->decrease_indent_by($this->spaces_to_indent);
     }
     $this->_indent = $munger->num_spaces;
 }
Esempio n. 2
0
 /**
  * Set this as the active or inactive transformer.
  * @param MUNGER $munger The transformation context.
  * @param boolean $value True if the transformer is being activated.
  * @param MUNGER_TOKEN $token Token that caused the activation.
  */
 public function activate($munger, $value, $token)
 {
     parent::activate($munger, $value, $token);
     $attrs = $token->attributes();
     $this->_term_class = read_array_index($attrs, 'dt_class');
     $this->_definition_class = read_array_index($attrs, 'dd_class');
 }