kernel/classes/ezpendingactions.php
public static function fetchByAction( $action, array $aCreationDateFilter = array() )
    {
        $filterConds = array( 'action' => $action );

        // Handle creation date filter
        if( !empty( $aCreationDateFilter ) )
        {
            if( count( $aCreationDateFilter ) != 2 )
            {
                eZDebug::writeError( __CLASS__.'::'.__METHOD__.' : Wrong number of entries for Creation date filter array' );
                return null;
            }

            list( $filterToken, $filterValue ) = $aCreationDateFilter;
            $aAuthorizedFilterTokens = array( '=', '<', '>', '<=', '>=' );
            if( !is_string( $filterToken ) || !in_array( $filterToken, $aAuthorizedFilterTokens ) )
            {
                eZDebug::writeError( __CLASS__.'::'.__METHOD__.' : Wrong filter type for creation date filter' );
                return null;
            }

            $filterConds['created'] = array( $filterToken, $filterValue );
        }

        $result = parent::fetchObjectList( self::definition(), null, $filterConds );

        return $result;
    }
public static function fetchByAction( $action, array $aCreationDateFilter = array() )
    {
        $filterConds = array( 'action' => $action );

        // Handle creation date filter
        if( !empty( $aCreationDateFilter ) )
        {
            if( count( $aCreationDateFilter ) != 2 )
            {
                eZDebug::writeError( __CLASS__.'::'.__METHOD__.' : Wrong number of entries for Creation date filter array' );
                return null;
            }

            list( $filterToken, $filterValue ) = $aCreationDateFilter;
            $aAuthorizedFilterTokens = array( '=', '<', '>', '<=', '>=' );
            if( !is_string( $filterToken ) || !in_array( $filterToken, $aAuthorizedFilterTokens ) )
            {
                eZDebug::writeError( __CLASS__.'::'.__METHOD__.' : Wrong filter type for creation date filter' );
                return null;
            }

            $filterConds['created'] = array( $filterToken, $filterValue );
        }

        $result = parent::fetchObjectList( self::definition(), null, $filterConds );

        return $result;
    }
public static function fetchByAction ( $ action , array $ aCreationDateFilter = array ( ) ) { $ filterConds = array ( 'action' => $ action ) ; // Handle creation date filter if ( ! empty ( $ aCreationDateFilter ) ) { if ( count ( $ aCreationDateFilter ) != 2 ) { eZDebug :: writeError ( __CLASS__ . '::' . __METHOD__ . ' : Wrong number of entries for Creation date filter array' ) ; return null ; } list ( $ filterToken , $ filterValue ) = $ aCreationDateFilter ; $ aAuthorizedFilterTokens = array ( '=' , '<' , '>' , '<=' , '>=' ) ; if ( ! is_string ( $ filterToken ) || ! in_array ( $ filterToken , $ aAuthorizedFilterTokens ) ) { eZDebug :: writeError ( __CLASS__ . '::' . __METHOD__ . ' : Wrong filter type for creation date filter' ) ; return null ; } $ filterConds [ 'created' ] = array ( $ filterToken , $ filterValue ) ; } $ result = parent :: fetchObjectList ( self :: definition ( ) , null , $ filterConds ) ; return $ result ; }
Fetches a pending actions list by action name
@param string $action
@param array $aCreationDateFilter Created date filter array (default is empty array). Must be a 2 entries array.
First entry is the filter token (can be '=', '<', '<=', '>', '>=')
Second entry is the filter value (timestamp)
@return array|null Array of eZPendingActions or null if no entry has been found
Fetches a pending actions list by action name