예제 #1
0
 /**
  *
  * @return $this
  *
  */
 public function add_cancel_button($text = null, array $attrs = array(), $class = '')
 {
     $button = new HTMLLongTag('button', $text ? $text : \ZPHP\String::get_html('cancel'));
     $button->update_params($attrs);
     $button->set_param('type', 'button');
     $button->add_class($class);
     $button->add_class(self::$_DEFAULT_BUTTON_CLASS);
     $button->add_class(self::$_DEFAULT_BUTTON_CANCEL_CLASS);
     $this->_buttons[] = $button;
     if (!$button->get_id()) {
         $button->set_random_id();
     }
     $this->_cancel_buttons[] = $button->get_id();
     return $this;
 }
예제 #2
0
 public static function page_index()
 {
     $links = array();
     $links[] = array('text' => 'Font Awesome Icons', 'href' => 'http://fortawesome.github.io/Font-Awesome/icons/', 'target' => '_blank');
     $links[] = array('text' => 'Database Entities', 'href' => \URL::route(self::URL_ENTITIES));
     $list = new HTML\HTMLLongTag('ul');
     $list->add_style('list-style', 'none');
     $list->add_style('margin', '0 0 0 -20px');
     foreach ($links as $link_params) {
         $list_item = new HTML\HTMLLongTag('li');
         $list_item->add_style('margin', '20px 0 5px 0');
         $list_item->add_style('padding', '20px 0 0px 0');
         $link_text = $link_params['text'];
         unset($link_params['text']);
         $link = new HTML\HTMLLongTag('a');
         $link->add_content($link_text);
         $link->add_style('font-weight', 'bold');
         $link->add_style('color', '#000');
         $link->add_style('font-size', '12pt');
         $link->add_style('text-decoration', 'underline');
         $link->update_params($link_params);
         $list_item->add_content($link);
         $list->add_content($list_item);
     }
     return self::_prepare_page_html($list, 'ZPHP Develop Tools');
 }