protected function getLastValidItem()
    {
        $validItems = $this->getValidItems();
        $result = null;
        if( !empty( $validItems ) )
        {
            $result = null;
            $lastTime = 0;
            foreach($validItems as $item)
            {
                if( $item -> attribute( 'ts_visible' ) >= $lastTime)
                {
                    $lastTime = $item -> attribute( 'ts_visible' );
                    $result = $item;
                }
            }
        }
        return $result;
    }
protected function getLastValidItem()
    {
        $validItems = $this->getValidItems();
        $result = null;
        if( !empty( $validItems ) )
        {
            $result = null;
            $lastTime = 0;
            foreach($validItems as $item)
            {
                if( $item -> attribute( 'ts_visible' ) >= $lastTime)
                {
                    $lastTime = $item -> attribute( 'ts_visible' );
                    $result = $item;
                }
            }
        }
        return $result;
    }
protected function getLastValidItem ( ) { $ validItems = $ this -> getValidItems ( ) ; $ result = null ; if ( ! empty ( $ validItems ) ) { $ result = null ; $ lastTime = 0 ; foreach ( $ validItems as $ item ) { if ( $ item -> attribute ( 'ts_visible' ) >= $ lastTime ) { $ lastTime = $ item -> attribute ( 'ts_visible' ) ; $ result = $ item ; } } } return $ result ; }
Fetch last valid item in valid list, if valid is empty, return null
in case of the same valid items, return the last one in order
@return eZPageBlockItem
Fetch last valid item in valid list if valid is empty return null in case of the same valid items return the last one in order