public function update($request, $match)
    {
        // تعیین داده‌ها
        $content = Pluf_Shortcuts_GetObjectOr404('CMS_Content', $match['modelId']);
        // بررسی دسترسی‌ها
        if (! CMS_Precondition::isAuthor($request)) {
            throw new Pluf_Exception_PermissionDenied('You are not an author');
        }
        if (! CMS_Precondition::isEditor($request) && $request->user->id !== $content->author_id) {
            throw new Pluf_Exception_PermissionDenied('You can not change content created by another author');
        }
        return parent::updateObject($request, $match, array(
            'model' => 'CMS_Content'
        ));
    }
public function update($request, $match)
    {
        // تعیین داده‌ها
        $content = Pluf_Shortcuts_GetObjectOr404('CMS_Content', $match['modelId']);
        // بررسی دسترسی‌ها
        if (! CMS_Precondition::isAuthor($request)) {
            throw new Pluf_Exception_PermissionDenied('You are not an author');
        }
        if (! CMS_Precondition::isEditor($request) && $request->user->id !== $content->author_id) {
            throw new Pluf_Exception_PermissionDenied('You can not change content created by another author');
        }
        return parent::updateObject($request, $match, array(
            'model' => 'CMS_Content'
        ));
    }
public function update ( $ request , $ match ) { // تعیین داده‌ها $ content = Pluf_Shortcuts_GetObjectOr404 ( 'CMS_Content' , $ match [ 'modelId' ] ) ; // بررسی دسترسی‌ها if ( ! CMS_Precondition :: isAuthor ( $ request ) ) { throw new Pluf_Exception_PermissionDenied ( 'You are not an author' ) ; } if ( ! CMS_Precondition :: isEditor ( $ request ) && $ request -> user -> id !== $ content -> author_id ) { throw new Pluf_Exception_PermissionDenied ( 'You can not change content created by another author' ) ; } return parent :: updateObject ( $ request , $ match , array ( 'model' => 'CMS_Content' ) ) ; }
Updates meta information of content

@param Pluf_HTTP_Request $request
@param array $match
@throws Pluf_Exception_PermissionDenied
@return Pluf_HTTP_Response
Updates meta information of content