The form of the NetworkPort can contain the details of the NetworkPortInstantiation as well as
NetworkName elements (if no more than one name is attached to this port). Feilds from both
NetworkPortInstantiation and NetworkName must not be process by the NetworkPort::add or
NetworkPort::update. But they must be kept for adding or updating these elements. This is
done after creating or updating the current port. Otherwise, its ID may not be known (in case
of new port).
To keep the unused fields, we check each field key. If it is owned by NetworkPort (ie :
exists inside the $this->fields array), then they remain inside $input. If they are prefix by
"Networkname_", then they are added to $this->input_for_NetworkName. Else, they are for the
instantiation and added to $this->input_for_instantiation.
This method must be call before NetworkPort::add or NetworkPort::update in case of NetworkPort
form. Otherwise, the entry of the database may contain wrong values.
public splitInputForElements ( $input ) | ||
$input |