public function transform($value)
    {
        if ($value === null || $value == '') {
            return null;
        }
        if (!($value instanceof Page)) {
            throw new TransformationFailedException('Expected an instance of a concrete5 page object.');
        }
        return intval($value->getCollectionID());
    }
public function transform($value)
    {
        if ($value === null || $value == '') {
            return null;
        }
        if (!($value instanceof Page)) {
            throw new TransformationFailedException('Expected an instance of a concrete5 page object.');
        }
        return intval($value->getCollectionID());
    }
public function transform ( $ value ) { if ( $ value === null || $ value == '' ) { return null ; } if ( ! ( $ value instanceof Page ) ) { throw new TransformationFailedException ( 'Expected an instance of a concrete5 page object.' ) ; } return intval ( $ value -> getCollectionID ( ) ) ; }
Converts a concrete5 page object to an integer.

@param \Concrete\Core\Page\Page $value The page object value
@return int The integer value
@throws TransformationFailedException If the given value is not an
instance of Concrete\Core\Page\Page.
Converts a concrete5 page object to an integer .