classes/collection/ElementCollection.php
public function exclude($iElementID = null)
    {
        if (empty($iElementID) || $this->isEmpty()) {
            return $this->returnThis();
        }

        $iElementIDKey = array_search($iElementID, $this->arElementIDList);
        if ($iElementIDKey === false) {
            return $this->returnThis();
        }

        unset($this->arElementIDList[$iElementIDKey]);

        return $this->returnThis();
    }
public function exclude($iElementID = null)
    {
        if (empty($iElementID) || $this->isEmpty()) {
            return $this->returnThis();
        }

        $iElementIDKey = array_search($iElementID, $this->arElementIDList);
        if ($iElementIDKey === false) {
            return $this->returnThis();
        }

        unset($this->arElementIDList[$iElementIDKey]);

        return $this->returnThis();
    }
public function exclude ( $ iElementID = null ) { if ( empty ( $ iElementID ) || $ this -> isEmpty ( ) ) { return $ this -> returnThis ( ) ; } $ iElementIDKey = array_search ( $ iElementID , $ this -> arElementIDList ) ; if ( $ iElementIDKey === false ) { return $ this -> returnThis ( ) ; } unset ( $ this -> arElementIDList [ $ iElementIDKey ] ) ; return $ this -> returnThis ( ) ; }
Exclude element id from collection
@see  \Lovata\Toolbox\Tests\Unit\CollectionTest::testExcludeMethod()
@link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#excludeielementid
@param int $iElementID
@return $this
Exclude element id from collection