eZ\Publish\Core\FieldType\Author\AuthorCollection::removeAuthorsById PHP Method

removeAuthorsById() public method

Removes authors from current collection with a list of Ids.
public removeAuthorsById ( array $authorIds )
$authorIds array Author's Ids to remove from current collection
    public function removeAuthorsById(array $authorIds)
    {
        $aAuthors = $this->getArrayCopy();
        foreach ($aAuthors as $i => $author) {
            if (in_array($author->id, $authorIds)) {
                unset($aAuthors[$i]);
            }
        }
        $this->exchangeArray($aAuthors);
    }