public function SassIfNode::addElse in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/tree/SassIfNode.php \SassIfNode::addElse()
* Adds an "else" statement to this node. *
Parameters
SassIfNode "else" statement node to add: * @return SassIfNode this node
File
- phamlp/
sass/ tree/ SassIfNode.php, line 57
Class
- SassIfNode
- SassIfNode class. Represents Sass If, Else If and Else statements. Else If and Else statement nodes are chained below the If statement node. @package PHamlP @subpackage Sass.tree
Code
public function addElse($node) {
if (is_null($this->else)) {
$node->parent = $this;
$node->root = $this->root;
$this->else = $node;
}
else {
$this->else
->addElse($node);
}
return $this;
}