name = $name; $this->title = $title; $this->startClosed(true); parent::__construct($children); } public function FieldHolder() { Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/prototype/prototype.js"); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/behaviour/behaviour.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/prototype_improvements.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/ToggleCompositeField.js"); return $this->renderWith($this->template); } /** * Determines if the field should render open or closed by default. * * @param boolean */ public function startClosed($bool) { ($bool) ? $this->addExtraClass('startClosed') : $this->removeExtraClass('startClosed'); } /** * @return String */ public function HeadingLevel() { return $this->headingLevel; } public function Type() { return ' toggleCompositeField'; } } ?>