Skip to content
Snippets Groups Projects
Commit 00a70da3 authored by John Voskuilen's avatar John Voskuilen
Browse files

Issue #2919482: phpcs

parent 8d84f589
No related branches found
No related tags found
No related merge requests found
Pipeline #90393 passed with warnings
......@@ -18,7 +18,9 @@ interface WorkflowManagerInterface {
* Implements hook_cron().
*
* @param int $start
* The start time in unix timestamp.
* @param int $end
* The end time in unix timestamp.
*/
public static function executeScheduledTransitionsBetween($start = 0, $end = 0);
......@@ -35,6 +37,7 @@ interface WorkflowManagerInterface {
* This is referenced in from WorkflowDefaultWidget::massageFormValues().
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity.
*/
public static function executeTransitionsOfEntity(EntityInterface $entity);
......@@ -48,6 +51,7 @@ interface WorkflowManagerInterface {
* Make sure some roles are allowed to participate in a Workflow by default.
*
* @param \Drupal\Core\Entity\EntityInterface $workflow
* The workflow object.
*/
public static function participateUserRoles(EntityInterface $workflow);
......@@ -55,6 +59,7 @@ interface WorkflowManagerInterface {
* Implements hook_user_delete().
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user account.
*/
public static function deleteUser(AccountInterface $account);
......@@ -71,8 +76,11 @@ interface WorkflowManagerInterface {
* "This action cannot be undone.
*
* @param $edit
* Not used.
* @param \Drupal\Core\Session\AccountInterface $account
* The user account.
* @param string $method
* The cancellation method.
*/
public static function cancelUser($edit, AccountInterface $account, $method);
......@@ -82,7 +90,6 @@ interface WorkflowManagerInterface {
/**
* Utility function to return an array of workflow fields.
* Call \Drupal::service('workflow.manager')->getFieldMap($entity_type_id);
*
* @param string $entity_type_id
* The content entity type to which the workflow fields are attached.
......@@ -104,8 +111,11 @@ interface WorkflowManagerInterface {
* Gets the TransitionWidget in a form (for e.g., Workflow History Tab)
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity.
* @param string $field_name
* The field name.
* @param array $form_state_additions
* Spome additions.
*
* @return array
* The form.
......@@ -116,9 +126,12 @@ interface WorkflowManagerInterface {
* Returns the attached fields (via Field UI)
*
* @param string $entity_type_id
* The entity type ID.
* @param string $bundle
* The entity bundle.
*
* @return array
* A keyed list of Field configurations
*/
public static function getAttachedFields($entity_type_id, $bundle);
......@@ -145,7 +158,9 @@ interface WorkflowManagerInterface {
* Gets the previous state ID of a given entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity.
* @param string $field_name
* The field name.
*
* @return string
* The ID of the previous state.
......@@ -156,9 +171,12 @@ interface WorkflowManagerInterface {
* Determine if User is owner/author of the entity.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user account.
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity.
*
* @return bool
* TRUE is user is owner of the entity.
*/
public static function isOwner(AccountInterface $account, EntityInterface $entity = NULL);
......@@ -166,8 +184,10 @@ interface WorkflowManagerInterface {
* Determine if the entity is Workflow* entity type.
*
* @param string $entity_type_id
* The entity type ID.
*
* @return bool
* TRUE, if the entity is defined by workflow module.
*
* @usage Use it when a function should not operate on Workflow objects.
*/
......
......@@ -195,7 +195,8 @@ class WorkflowTransitionListBuilder extends EntityListBuilder {
'class' => ['footer-class'],
'data' => [
[
'data' => self::WORKFLOW_MARK_STATE_IS_DELETED . ' ' . $this->t('State is no longer available.'),
'data' => self::WORKFLOW_MARK_STATE_IS_DELETED . ' '
. $this->t('State is no longer available.'),
'colspan' => count($build['table']['#header']),
],
],
......@@ -203,7 +204,8 @@ class WorkflowTransitionListBuilder extends EntityListBuilder {
];
*/
$build['workflow_footer'] = [
'#markup' => self::WORKFLOW_MARK_STATE_IS_DELETED . ' ' . $this->t('State is no longer available.'),
'#markup' => self::WORKFLOW_MARK_STATE_IS_DELETED . ' '
. $this->t('State is no longer available.'),
'#weight' => 500, // @todo Make this better.
];
}
......@@ -238,7 +240,7 @@ class WorkflowTransitionListBuilder extends EntityListBuilder {
/**
* Sets the target entity.
*
* @return WorkflowTransitionListBuilder
* @return \Drupal\workflow\WorkflowTransitionListBuilder
* The object itself.
*/
public function setTargetEntity(EntityInterface $entity) {
......@@ -249,7 +251,7 @@ class WorkflowTransitionListBuilder extends EntityListBuilder {
/**
* Gets the target entity.
*
* @return EntityInterface
* @return \Drupal\Core\Entity\EntityInterface
* The entity.
*/
public function getTargetEntity() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment