Exemplo n.º 1
0
 public function __construct(\MUtil_Html_PagePanel $panel, $glue = ' ', $args_array = null)
 {
     $args = \MUtil_Ra::args(func_get_args(), array('panel' => 'MUtil_Html_PagePanel', 'glue'), array('glue' => ' '));
     if (isset($args['panel'])) {
         $this->_panel = $args['panel'];
         unset($args['panel']);
     } else {
         throw new \MUtil_Html_HtmlException('Illegal argument: no panel passed to ' . __CLASS__ . ' constructor.');
     }
     if (isset($args['glue'])) {
         $this->setGlue($args['glue']);
         unset($args['glue']);
     } else {
         $this->setGlue($glue);
     }
     $page = $this->toLazy()->page;
     $args = array($page) + $args;
     // We create the element here as this creates as an element using the specifications at this moment.
     // If created at render time the settings might have changed, introducing hard to trace bugs.
     $this->_element = $panel->createPageLink($this->toLazy()->notCurrent(), $page, $args);
 }