Planner Utility 

The PlannerUtility can be used to easily interact programmatically with the content planner.

class PlannerUtility
Fully qualified name
\Xima\XimaTypo3ContentPlanner\Utility\PlannerUtility

Utility class to use content planner functionalities.

getListOfStatus ( )

Simple function to get a list of all available status.

returntype

array

updateStatusForRecord ( $table, $uid, $status, $assignee = null)

Simple function to update the status of a record.

param string $table

Table name of the record.

param int $uid

UID of the record.

param \Xima\XimaTypo3ContentPlanner\Domain\Model\Status|int|string $status

Status object, UID or title of the status.

param \Xima\XimaTypo3ContentPlanner\Domain\Model\BackendUser|int|string|null $assignee

Optional user object, UID or username of the assignee.

returntype

void

getStatusOfRecord ( $table, $uid)

Simple function to get the status of a record.

param string $table

Table name of the record.

param int $uid

UID of the record.

returntype

\Xima\XimaTypo3ContentPlanner\Domain\Model\Status|null

getStatus ( $identifier)

Simple function to get a status.

param int|string $identifier

UID or title of the status record.

returntype

\Xima\XimaTypo3ContentPlanner\Domain\Model\Status|null

getCommentsOfRecord ( $table, $uid, $raw = false, $showResolved = false)

Simple function to fetch all comments of a record.

param string $table

Table name of the record.

param int $uid

UID of the record.

param bool $raw

Get raw comment records instead of optimized DTOs.

param bool $showResolved

Include resolved comments and replies. By default they are omitted.

returntype

array

addCommentsToRecord ( $table, $uid, $comments, $author = null, $parentUid = 0)

Simple function to add comment(s) to a content planner record.

param string $table

Table name of the record.

param int $uid

UID of the record.

param array|string $comments

Single comment string or array of multiple comments in a row.

param \Xima\XimaTypo3ContentPlanner\Domain\Model\BackendUser|int|string|null $author

Optional user object, UID or username of the author.

param int $parentUid

UID of the parent comment to reply to. Must belong to the same record, otherwise an \InvalidArgumentException is thrown. 0 creates a top-level comment. If it identifies an existing reply rather than a root comment, the new comment is attached to that reply's root comment instead.

returntype

void

generateTodoForComment ( $todos)

Simple function to generate the html todo markup for a comment to easily insert them into the comment content.

param array $todos

Array of todo strings.

returntype

string

clearCommentsOfRecord ( $table, $uid, $like = null)

Simple function to clear all comment(s) of a content planner record.

param string $table

Table name of the record.

param int $uid

UID of the record.

param string|null $like

Optional string to filter comments by content.

returntype

void

hasComments ( $record)

Simple function to check whether a record has comments.

param array $record

Record array containing the content planner comment counter field.

returntype

bool