Open Journal Systems  3.3.0
PKP\Services\Interfaces\EntityWriteInterface Interface Reference

Public Member Functions

 add ($object, $request)
 
 delete ($object)
 
 edit ($object, $params, $request)
 
 validate ($action, $props, $allowedLocales, $primaryLocale)
 

Detailed Description

Definition at line 22 of file EntityWriteInterface.inc.php.

Member Function Documentation

◆ add()

PKP\Services\Interfaces\EntityWriteInterface::add (   $object,
  $request 
)

Add a new object

This does not check if the user is authorized to add the object, or validate or sanitize this object.

Parameters
$objectobject
$requestRequest
Returns
object

◆ delete()

PKP\Services\Interfaces\EntityWriteInterface::delete (   $object)

Delete an object

This does not check if the user is authorized to delete the object or if the object exists.

Parameters
$objectobject
Returns
boolean

◆ edit()

PKP\Services\Interfaces\EntityWriteInterface::edit (   $object,
  $params,
  $request 
)

Edit an object

This does not check if the user is authorized to edit the object, or validate or sanitize the new object values.

Parameters
$objectobject
$paramsArray Key/value array of new data
$requestRequest
Returns
object

◆ validate()

PKP\Services\Interfaces\EntityWriteInterface::validate (   $action,
  $props,
  $allowedLocales,
  $primaryLocale 
)

Validate the properties of an object

Passes the properties through the SchemaService to validate them, and performs any additional checks needed to validate the entity.

This does NOT authenticate the current user to perform the action.

Parameters
$actionstring The type of action required (add/edit). One of the VALIDATE_ACTION_... constants.
$propsarray The data to validate
$allowedLocalesarray Which locales are allowed for this entity
$primaryLocalestring
Returns
array List of error messages. The array keys are property names

The documentation for this interface was generated from the following file: