\O3PO_Ready2PublishStorage

Trait for the storage of data on manuscripts ready to publish.

Summary

Methods
Properties
Constants
__construct()
store_manuscript()
get_manuscript()
get_all_manuscripts()
post_id_for_eprint()
get_manuscripts()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$manuscript_info_fields_to_store
$plugin_name
$slug
N/A

Properties

$manuscript_info_fields_to_store

$manuscript_info_fields_to_store : array

Manuscript fields to store

array of fields to store. All other fields are ignored.

Type

array — Array of fields to store.

$plugin_name

$plugin_name : string

Name of the plugin under which this storage operates

Type

string — PLugin name.

$slug

$slug : string

Slug of the storage

Type

string — Slug.

Methods

__construct()

__construct(string  $plugin_name, string  $slug) 

Construct the storage

Parameters

string $plugin_name

The name of the plugin under which this storage runs.

string $slug

Slug of this storage.

store_manuscript()

store_manuscript(array  $manuscript_info) 

Store a manuscript

Parameters

array $manuscript_info

Information about the manuscript to store.

get_manuscript()

get_manuscript(integer  $id) 

Get a manuscript by ID

Parameters

integer $id

ID of the manuscript to get.

get_all_manuscripts()

get_all_manuscripts() 

Get all manuscripts

post_id_for_eprint()

post_id_for_eprint(string  $eprint_without_version) : integer|null

Find the id of the post belonging to this eprint

Parameters

string $eprint_without_version

The eprint without version.

Returns

integer|null —

The post id or null in case no post is found for the eprint

get_manuscripts()

get_manuscripts(string  $post_status) : array

Get manuscripts by post status

Parameters

string $post_status

One of 'unprocessed', 'published', or 'partial'

Returns

array —

Array mapping manuscript ids to manuscript information and the post_id if any