/** * @since version 0.84 * * @param $itemtype * @param $base HTMLTableBase object * @param $super HTMLTableSuperHeader object (default NULL) * @param $father HTMLTableHeader object (default NULL) * @param $options array **/ static function getHTMLTableHeader($itemtype, HTMLTableBase $base, HTMLTableSuperHeader $super = NULL, HTMLTableHeader $father = NULL, array $options = array()) { $column_name = __CLASS__; if (isset($options['dont_display'][$column_name])) { return; } $base->addHeader($column_name, __('Interface'), $super, $father); }
/** * @param $table HTMLTableMain object * @param $name * @param $content **/ function __construct(HTMLTableMain $table, $name, $content) { parent::__construct(false); $this->table = $table; $this->name = $name; $this->content = $content; }
/** * @since version 0.84 * get the HTMLTable Header for the current device according to the type of the item that * is requesting * * @param $itemtype string the type of the item * @param $base HTMLTableBase object:the element on which adding the header * (ie.: HTMLTableMain or HTMLTableGroup) * @param $super HTMLTableSuperHeader object: the super header * (in case of adding to HTMLTableGroup) (default NULL) * @param $father HTMLTableHeader object: the father of the current headers * (default NULL) * @param $options array parameter such as restriction * * @return nothing (elements added to $base) **/ static function getHTMLTableHeader($itemtype, HTMLTableBase $base, HTMLTableSuperHeader $super = NULL, HTMLTableHeader $father = NULL, array $options = array()) { $this_type = get_called_class(); if (isset($options['dont_display'][$this_type])) { return $father; } if (static::canView()) { $content = "<a href='" . static::getSearchURL() . "'>" . static::getTypeName(1) . "</a>"; } else { $content = static::getTypeName(1); } $linktype = static::getItem_DeviceType(); if (in_array($itemtype, $linktype::itemAffinity())) { $column = $base->addHeader('device', $content, $super, $father); $column->setItemType($this_type, isset($options['itemtype_title']) ? $options['itemtype_title'] : ''); } else { $column = $father; } return $column; }
/** * @since version 0.84 * * @param $itemtype * @param $base HTMLTableBase object * @param $super HTMLTableSuperHeader object (default NULL) * @param $father HTMLTableHeader object (default NULL) * @param $options array **/ static function getHTMLTableHeader($itemtype, HTMLTableBase $base, HTMLTableSuperHeader $super = NULL, HTMLTableHeader $father = NULL, array $options = array()) { $column_name = __CLASS__; if (isset($options['dont_display'][$column_name])) { return; } if ($itemtype != 'NetworkName') { return; } $content = self::getTypeName(); if (isset($options['column_links'][$column_name])) { $content = "<a href='" . $options['column_links'][$column_name] . "'>{$content}</a>"; } $this_header = $base->addHeader($column_name, $content, $super, $father); $this_header->setItemType('NetworkAlias'); }
/** * @since version 0.84 * * @param $itemtype * @param $base HTMLTableBase object * @param $super HTMLTableSuperHeader object (default NULL * @param $father HTMLTableHeader object (default NULL) * @param $options array **/ static function getHTMLTableHeader($itemtype, HTMLTableBase $base, HTMLTableSuperHeader $super = NULL, HTMLTableHeader $father = NULL, array $options = array()) { $column_name = __CLASS__; if (isset($options['massiveactionnetworkname']) && $options['massiveactionnetworkname']) { $delete_all_column = $base->addHeader('delete', Html::getCheckAllAsCheckbox('mass' . __CLASS__ . $options['rand']), $super, $father); $delete_all_column->setHTMLClass('center'); } if (!isset($options['dont_display'][$column_name])) { $content = self::getTypeName(); if (isset($options['column_links'][$column_name])) { $content = "<a href='" . $options['column_links'][$column_name] . "'>{$content}</a>"; } $father = $base->addHeader($column_name, $content, $super, $father); $father->setItemType('NetworkName'); if (isset($options['display_isDynamic']) && $options['display_isDynamic']) { $father = $base->addHeader($column_name . '_dynamic', __('Automatic inventory'), $super, $father); } } NetworkAlias::getHTMLTableHeader(__CLASS__, $base, $super, $father, $options); IPAddress::getHTMLTableHeader(__CLASS__, $base, $super, $father, $options); }
/** * @param $itemtype * @param $base HTMLTableBase object * @param $super HTMLTableSuperHeader object (default NULL) * @param $father HTMLTableHeader object (default NULL) * @param $options array **/ static function getHTMLTableHeader($itemtype, HTMLTableBase $base, HTMLTableSuperHeader $super = NULL, HTMLTableHeader $father = NULL, array $options = array()) { $column_name = __CLASS__; $content = self::getTypeName(); if ($itemtype == 'IPNetwork') { $base->addHeader('Item', _n('Item', 'Items', 1), $super, $father); $base->addHeader('NetworkPort', NetworkPort::getTypeName(0), $super, $father); $base->addHeader('NetworkName', NetworkName::getTypeName(1), $super, $father); $base->addHeader('Entity', Entity::getTypeName(1), $super, $father); } else { if (isset($options['dont_display'][$column_name])) { return; } if (isset($options['column_links'][$column_name])) { $content = "<a href='" . $options['column_links'][$column_name] . "'>{$content}</a>"; } $father = $base->addHeader($column_name, $content, $super, $father); if (isset($options['display_isDynamic']) && $options['display_isDynamic']) { $father = $base->addHeader($column_name . '_dynamic', __('Automatic inventory'), $super, $father); } IPNetwork::getHTMLTableHeader(__CLASS__, $base, $super, $father, $options); } }
function __construct() { parent::__construct(true); }
/** * @since version 0.84 * * @see CommonDevice::getHTMLTableHeader() **/ static function getHTMLTableHeader($itemtype, HTMLTableBase $base, HTMLTableSuperHeader $super = NULL, HTMLTableHeader $father = NULL, array $options = array()) { $column_name = __CLASS__; if (isset($options['dont_display'][$column_name])) { return; } if (in_array($itemtype, NetworkPort::getNetworkPortInstantiations())) { $base->addHeader($column_name, __('Interface'), $super, $father); } else { $column = parent::getHTMLTableHeader($itemtype, $base, $super, $father, $options); if ($column == $father) { return $father; } Manufacturer::getHTMLTableHeader(__CLASS__, $base, $super, $father, $options); $base->addHeader('devicenetworkcard_bandwidth', __('Flow'), $super, $father); } }
/** * @since version 0.84 * * @param $itemtype * @param $base HTMLTableBase object * @param $super HTMLTableSuperHeader object (default NULL * @param $father HTMLTableHeader object (default NULL) * @param $options array **/ static function getHTMLTableHeader($itemtype, HTMLTableBase $base, HTMLTableSuperHeader $super = NULL, HTMLTableHeader $father = NULL, array $options = array()) { $column_name = __CLASS__; if (isset($options['dont_display'][$column_name])) { return; } if ($itemtype == 'NetworkPort_Vlan') { $base->addHeader($column_name, self::getTypeName(), $super, $father); } }
/** * @since version 0.84 * * @param $itemtype * @param $base HTMLTableBase object * @param $super HTMLTableSuperHeader object (default NULL) * @param $father HTMLTableHeader object (default NULL) * @param $options array **/ static function getHTMLTableHeader($itemtype, HTMLTableBase $base, HTMLTableSuperHeader $super = NULL, HTMLTableHeader $father = NULL, array $options = array()) { if ($itemtype != 'IPAddress') { return; } $column_name = __CLASS__; if (isset($options['dont_display'][$column_name])) { return; } $content = self::getTypeName(); $this_header = $base->addHeader($column_name, $content, $super, $father); $this_header->setItemType(__CLASS__); }