{
protected $role = '';
- public function getHTMLContainer()
+ protected function _getHTMLContainer()
{
$this->to = self::normalizeAnchor($this->to);
$this->compiler->addPageLabel($this->page, $this->to);
return self::makeAudioTag($this, $w, $h, $this->compiler);
}
- public function getCSSContainer()
+ protected function _getCSSContainer()
{
- $css = parent::getCSSContainer();
+ $css = parent::_getCSSContainer();
$css .= '#l_' . $this->id . ' audio{';
$css .= 'width:' . round($this->width * $this->getCssScale()) . 'px;';
$css .= 'height:' . round($this->height * $this->getCssScale()) . 'px;';
protected $_init;
+ protected $_cssContainer = null;
+ protected $_htmlContainer = null;
+
/**
*
* @var CompilerInterface
return $this->infobulle;
}
+
public function getHTMLContainer() {
+ if (null === $this->_htmlContainer) {
+ $this->_htmlContainer = $this->_getHTMLContainer();
+ }
+ return $this->_htmlContainer;
+ }
+
+ protected function _getHTMLContainer() {
$addContent = $this->getAdditionnalContent();
return '<div class="' . $this->getHTMLContainerClass() . '" data-blendmode="' . $this->blendmode . '" data-hidden="' . $this->hidden . '" data-scorm="' . $this->scorm . '" data-id="' . $this->uid . '" id="l_' . $this->id . '"' . $addContent . '>' . $this->getHTMLContent() . '</div>';
}
}
public function getCSSContainer() {
+ if (null === $this->_cssContainer) {
+ $this->_cssContainer = $this->_getCSSContainer();
+ }
+ return $this->_cssContainer;
+ }
+
+ protected function _getCSSContainer() {
if ($this->moveOnEvenPage()) {
$this->page--;
$this->left += $this->compiler->getWidth();