classes/collection/ElementCollection.php
public function first()
    {
        if ($this->isEmpty()) {
            return $this->makeItem(null);
        }

        $arResultIDList = $this->arElementIDList;

        $iElementID = array_shift($arResultIDList);

        return $this->makeItem($iElementID);
    }
public function first()
    {
        if ($this->isEmpty()) {
            return $this->makeItem(null);
        }

        $arResultIDList = $this->arElementIDList;

        $iElementID = array_shift($arResultIDList);

        return $this->makeItem($iElementID);
    }
public function first ( ) { if ( $ this -> isEmpty ( ) ) { return $ this -> makeItem ( null ) ; } $ arResultIDList = $ this -> arElementIDList ; $ iElementID = array_shift ( $ arResultIDList ) ; return $ this -> makeItem ( $ iElementID ) ; }
Get first element item
@see  \Lovata\Toolbox\Tests\Unit\CollectionTest::testFirstMethod()
@link https://github.com/lovata/oc-toolbox-plugin/wiki/ElementCollection#first
@return \Lovata\Toolbox\Classes\Item\ElementItem|null
Get first element item