NetworkPort::getNetworkPortInstantiations PHP Method

getNetworkPortInstantiations() static public method

\brief get the list of available network port type.
static public getNetworkPortInstantiations ( ) : array
return array of available type of network ports
    static function getNetworkPortInstantiations()
    {
        global $CFG_GLPI;
        return $CFG_GLPI['networkport_instantiations'];
    }

Usage Example

 /**
  * @since version 0.85
  *
  * @see CommonDBTM::showMassiveActionsSubForm()
  **/
 static function showMassiveActionsSubForm(MassiveAction $ma)
 {
     global $CFG_GLPI;
     switch ($ma->getAction()) {
         case 'transform_to':
             Dropdown::showItemTypes('transform_to', NetworkPort::getNetworkPortInstantiations(), array('value' => 'NetworkPortEthernet'));
             echo "<br><br>";
             echo Html::submit(_x('button', 'Post'), array('name' => 'massiveaction')) . "</span>";
             return true;
     }
     return parent::showMassiveActionsSubForm($ma);
 }
All Usage Examples Of NetworkPort::getNetworkPortInstantiations