code/libraries/joomlatools/library/model/entity/composite.php
public function insert(KObjectHandlable $entity)
    {
        if (!$entity instanceof KModelEntityInterface) {
            throw new InvalidArgumentException('Entity needs to implement KModelEntityInterface');
        }

        $this->offsetSet($entity, null);

        return true;
    }
public function insert(KObjectHandlable $entity)
    {
        if (!$entity instanceof KModelEntityInterface) {
            throw new InvalidArgumentException('Entity needs to implement KModelEntityInterface');
        }

        $this->offsetSet($entity, null);

        return true;
    }
public function insert ( KObjectHandlable $ entity ) { if ( ! $ entity instanceof KModelEntityInterface ) { throw new InvalidArgumentException ( 'Entity needs to implement KModelEntityInterface' ) ; } $ this -> offsetSet ( $ entity , null ) ; return true ; }
Insert an entity into the collection

The entity will be stored by it's identity_key if set or otherwise by it's object handle.

@param  KObjectHandlable|KModelEntityInterface $entity
@throws InvalidArgumentException if the object doesn't implement KModelEntity
@return boolean    TRUE on success FALSE on failure
Insert an entity into the collection