src/Graviton/RestBundle/Model/DocumentModel.php
protected function checkIfOriginRecord($record)
    {
        if ($record instanceof RecordOriginInterface
            && !$record->isRecordOriginModifiable()
        ) {
            $values = $this->notModifiableOriginRecords;
            $originValue = strtolower(trim($record->getRecordOrigin()));

            if (in_array($originValue, $values)) {
                $msg = sprintf("Must not be one of the following keywords: %s", implode(', ', $values));

                throw new RecordOriginModifiedException($msg);
            }
        }
    }
protected function checkIfOriginRecord($record)
    {
        if ($record instanceof RecordOriginInterface
            && !$record->isRecordOriginModifiable()
        ) {
            $values = $this->notModifiableOriginRecords;
            $originValue = strtolower(trim($record->getRecordOrigin()));

            if (in_array($originValue, $values)) {
                $msg = sprintf("Must not be one of the following keywords: %s", implode(', ', $values));

                throw new RecordOriginModifiedException($msg);
            }
        }
    }
protected function checkIfOriginRecord ( $ record ) { if ( $ record instanceof RecordOriginInterface && ! $ record -> isRecordOriginModifiable ( ) ) { $ values = $ this -> notModifiableOriginRecords ; $ originValue = strtolower ( trim ( $ record -> getRecordOrigin ( ) ) ) ; if ( in_array ( $ originValue , $ values ) ) { $ msg = sprintf ( "Must not be one of the following keywords: %s" , implode ( ', ' , $ values ) ) ; throw new RecordOriginModifiedException ( $ msg ) ; } } }
Checks the recordOrigin attribute of a record and will throw an exception if value is not allowed

@param Object $record record

@return void
Checks the recordOrigin attribute of a record and will throw an exception if value is not allowed