/** * Create a new page anchor * @param string $label label for the anchor * @param string $class style class for the anchor * @param int $page page number to link to * @return zibo\library\html\Anchor */ private function createAnchor($label, $class, $page) { $anchor = new Anchor($label); if ($this->onclick) { $anchor->setAttribute('onclick', str_replace('%page%', $page, $this->onclick)); } if ($this->href) { $anchor->setAttribute('href', str_replace('%page%', $page, $this->href)); } $anchor->setClass($class); return $anchor; }