public function SassIfNode::addElse in Sassy 7.3
Same name and namespace in other branches
- 7 phamlp/sass/tree/SassIfNode.php \SassIfNode::addElse()
Adds an "else" statement to this node.
Parameters
SassIfNode "else" statement node to add:
Return value
SassIfNode this node
File
- phpsass/
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;
}