CommonDBTM::isEntityAssign PHP Method

isEntityAssign() public method

Can be overloaded (ex : infocom)
public isEntityAssign ( ) : boolean
return boolean
    function isEntityAssign()
    {
        if (!array_key_exists('id', $this->fields)) {
            $this->getEmpty();
        }
        return array_key_exists('entities_id', $this->fields);
    }

Usage Example

 function isEntityAssign()
 {
     // Case of Duplicate Entity info to child
     if (parent::isEntityAssign()) {
         return true;
     }
     if (preg_match('/^itemtype/', $this->itemtype)) {
         $type = $this->fields[$this->itemtype];
     } else {
         $type = $this->itemtype;
     }
     if (class_exists($type)) {
         $item = new $type();
         return $item->isEntityAssign();
     }
     return -1;
 }
All Usage Examples Of CommonDBTM::isEntityAssign
CommonDBTM