protected function _actionUpdatephotos($context)
    {
        $this->execute('addphoto', $context);
        $photo_ids = (array) AnConfig::unbox($context->data->photo_id);

        foreach ($this->getItem()->photos as $photo) {
            if (!in_array($photo->id, $photo_ids)) {
                $this->getItem()->removePhoto($photo);
            }
        }

        return $this->getItem();
    }
protected function _actionUpdatephotos($context)
    {
        $this->execute('addphoto', $context);
        $photo_ids = (array) AnConfig::unbox($context->data->photo_id);

        foreach ($this->getItem()->photos as $photo) {
            if (!in_array($photo->id, $photo_ids)) {
                $this->getItem()->removePhoto($photo);
            }
        }

        return $this->getItem();
    }
protected function _actionUpdatephotos ( $ context ) { $ this -> execute ( 'addphoto' , $ context ) ; $ photo_ids = ( array ) AnConfig :: unbox ( $ context -> data -> photo_id ) ; foreach ( $ this -> getItem ( ) -> photos as $ photo ) { if ( ! in_array ( $ photo -> id , $ photo_ids ) ) { $ this -> getItem ( ) -> removePhoto ( $ photo ) ; } } return $ this -> getItem ( ) ; }
Updates the photos in a set given an array of ids.

@param object POST data

@return object ComPhotosDomainEntitySet
Updates the photos in a set given an array of ids .