protected function modifyRecordValue(Content $entity, $field, $value)
    {
        $recordId = $entity->getId();
        $contentTypeName = (string) $entity->getContenttype();
        $canModify = $this->users->isAllowed("contenttype:$contentTypeName:edit:$recordId");
        if (!$canModify) {
            $this->loggerFlash->error(Trans::__('general.access-denied.content-not-modified', ['%title%' => $entity->getTitle()]));

            return;
        }
        $entity->$field = Input::cleanPostedData($value);
        $entity->_modified = true;
    }
protected function modifyRecordValue(Content $entity, $field, $value)
    {
        $recordId = $entity->getId();
        $contentTypeName = (string) $entity->getContenttype();
        $canModify = $this->users->isAllowed("contenttype:$contentTypeName:edit:$recordId");
        if (!$canModify) {
            $this->loggerFlash->error(Trans::__('general.access-denied.content-not-modified', ['%title%' => $entity->getTitle()]));

            return;
        }
        $entity->$field = Input::cleanPostedData($value);
        $entity->_modified = true;
    }
protected function modifyRecordValue ( Content $ entity , $ field , $ value ) { $ recordId = $ entity -> getId ( ) ; $ contentTypeName = ( string ) $ entity -> getContenttype ( ) ; $ canModify = $ this -> users -> isAllowed ( "contenttype:$contentTypeName:edit:$recordId" ) ; if ( ! $ canModify ) { $ this -> loggerFlash -> error ( Trans :: __ ( 'general.access-denied.content-not-modified' , [ '%title%' => $ entity -> getTitle ( ) ] ) ) ; return ; } $ entity -> $ field = Input :: cleanPostedData ( $ value ) ; $ entity -> _modified = true ; }
Modify a record's value if permitted.

@param Content $entity
@param string  $field
@param mixed   $value
Modify a record s value if permitted .