src/Model/Media/Content.php
public function getAllMedia($objectType = 'media', $objectURI = NULL, $objectId = NULL) {

        //Get the object list of items which have no target for the timeline;
        //The timeline is for root objects only, any item with a target is the result of an interaction
        //For instance blah commented on itemtarget etc... and should be shown on a seperate activity feed
        $objects = $this->getMediaObjectsList($objectType, $objectURI, $objectId)->fetchAll();
        $items = array();


        //Parse the mediacollections;
        foreach ($objects as $i=>$object) {
            $object = $this->getOwner($object, $object['media_owner']);

            //If object is an attachment ?
            if($object['object_type']==="attachment"):
               $object['media_object'] = $object['object_uri']; //add to the collection
                if(empty($object['media_title'])):
                    $object['media_title'] = $object['attachment_name'];
                endif;
            endif;

            $object['media_comment_target'] = $object['object_uri'];
            $object['media_published'] = $object['object_created_on'];

            //CleanUp
//            foreach ($object as $key => $value):
//                $object[str_replace(array('media_', 'object_'), '', $key)] = $value;
//                unset($object[$key]);
//            endforeach;

            $items[] = $object;
        }

        //print_r($items);

        $mediacollections = new Collection();
        $mediacollections::set("items", $items); //update the collection
        $mediacollections::set("totalItems", count($items));

        $collection = $mediacollections::getArray();

        return $collection;
    }
public function getAllMedia($objectType = 'media', $objectURI = NULL, $objectId = NULL) {

        //Get the object list of items which have no target for the timeline;
        //The timeline is for root objects only, any item with a target is the result of an interaction
        //For instance blah commented on itemtarget etc... and should be shown on a seperate activity feed
        $objects = $this->getMediaObjectsList($objectType, $objectURI, $objectId)->fetchAll();
        $items = array();


        //Parse the mediacollections;
        foreach ($objects as $i=>$object) {
            $object = $this->getOwner($object, $object['media_owner']);

            //If object is an attachment ?
            if($object['object_type']==="attachment"):
               $object['media_object'] = $object['object_uri']; //add to the collection
                if(empty($object['media_title'])):
                    $object['media_title'] = $object['attachment_name'];
                endif;
            endif;

            $object['media_comment_target'] = $object['object_uri'];
            $object['media_published'] = $object['object_created_on'];

            //CleanUp
//            foreach ($object as $key => $value):
//                $object[str_replace(array('media_', 'object_'), '', $key)] = $value;
//                unset($object[$key]);
//            endforeach;

            $items[] = $object;
        }

        //print_r($items);

        $mediacollections = new Collection();
        $mediacollections::set("items", $items); //update the collection
        $mediacollections::set("totalItems", count($items));

        $collection = $mediacollections::getArray();

        return $collection;
    }
public function getAllMedia ( $ objectType = 'media' , $ objectURI = NULL , $ objectId = NULL ) { //Get the object list of items which have no target for the timeline; //The timeline is for root objects only, any item with a target is the result of an interaction //For instance blah commented on itemtarget etc... and should be shown on a seperate activity feed $ objects = $ this -> getMediaObjectsList ( $ objectType , $ objectURI , $ objectId ) -> fetchAll ( ) ; $ items = array ( ) ; //Parse the mediacollections; foreach ( $ objects as $ i => $ object ) { $ object = $ this -> getOwner ( $ object , $ object [ 'media_owner' ] ) ; //If object is an attachment ? if ( $ object [ 'object_type' ] === "attachment" ) : $ object [ 'media_object' ] = $ object [ 'object_uri' ] ; //add to the collection if ( empty ( $ object [ 'media_title' ] ) ) : $ object [ 'media_title' ] = $ object [ 'attachment_name' ] ; endif ; endif ; $ object [ 'media_comment_target' ] = $ object [ 'object_uri' ] ; $ object [ 'media_published' ] = $ object [ 'object_created_on' ] ; //CleanUp //            foreach ($object as $key => $value): //                $object[str_replace(array('media_', 'object_'), '', $key)] = $value; //                unset($object[$key]); //            endforeach; $ items [ ] = $ object ; } //print_r($items); $ mediacollections = new Collection ( ) ; $ mediacollections :: set ( "items" , $ items ) ; //update the collection $ mediacollections :: set ( "totalItems" , count ( $ items ) ) ; $ collection = $ mediacollections :: getArray ( ) ; return $ collection ; }
Returns all the published media stories
@return array An array of media stream objects see {@link Media\Collecion}
Returns all the published media stories