updated core
This commit is contained in:
+3
-3
@@ -7,8 +7,8 @@ package: Testing
|
||||
dependencies:
|
||||
- workflows
|
||||
|
||||
# Information added by Drupal.org packaging script on 2017-11-03
|
||||
version: '8.4.2'
|
||||
# Information added by Drupal.org packaging script on 2018-01-03
|
||||
version: '8.4.4'
|
||||
core: '8.x'
|
||||
project: 'drupal'
|
||||
datestamp: 1509719929
|
||||
datestamp: 1515021228
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\workflow_type_test;
|
||||
|
||||
use Drupal\workflows\StateInterface;
|
||||
|
||||
/**
|
||||
* A value object representing a workflow state.
|
||||
*/
|
||||
class DecoratedState implements StateInterface {
|
||||
|
||||
/**
|
||||
* The vanilla state object from the Workflow module.
|
||||
*
|
||||
* @var \Drupal\workflows\StateInterface
|
||||
*/
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Extra information added to state.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $extra;
|
||||
|
||||
/**
|
||||
* DecoratedState constructor.
|
||||
*
|
||||
* @param \Drupal\workflows\StateInterface $state
|
||||
* The vanilla state object from the Workflow module.
|
||||
* @param string $extra
|
||||
* (optional) Extra information stored on the state. Defaults to ''.
|
||||
*/
|
||||
public function __construct(StateInterface $state, $extra = '') {
|
||||
$this->state = $state;
|
||||
$this->extra = $extra;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the extra information stored on the state.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExtra() {
|
||||
return $this->extra;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function id() {
|
||||
return $this->state->id();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function label() {
|
||||
return $this->state->label();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function weight() {
|
||||
return $this->state->weight();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function canTransitionTo($to_state_id) {
|
||||
return $this->state->canTransitionTo($to_state_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getTransitionTo($to_state_id) {
|
||||
return $this->state->getTransitionTo($to_state_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getTransitions() {
|
||||
return $this->state->getTransitions();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\workflow_type_test;
|
||||
|
||||
use Drupal\workflows\TransitionInterface;
|
||||
|
||||
/**
|
||||
* A value object representing a workflow transition.
|
||||
*/
|
||||
class DecoratedTransition implements TransitionInterface {
|
||||
|
||||
/**
|
||||
* The vanilla transition object from the Workflow module.
|
||||
*
|
||||
* @var \Drupal\workflows\TransitionInterface
|
||||
*/
|
||||
protected $transition;
|
||||
|
||||
/**
|
||||
* Extra information added to transition.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $extra;
|
||||
|
||||
/**
|
||||
* DecoratedTransition constructor.
|
||||
*
|
||||
* @param \Drupal\workflows\TransitionInterface $transition
|
||||
* The vanilla transition object from the Workflow module.
|
||||
* @param string $extra
|
||||
* (optional) Extra information stored on the transition. Defaults to ''.
|
||||
*/
|
||||
public function __construct(TransitionInterface $transition, $extra = '') {
|
||||
$this->transition = $transition;
|
||||
$this->extra = $extra;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the extra information stored on the transition.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExtra() {
|
||||
return $this->extra;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function id() {
|
||||
return $this->transition->id();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function label() {
|
||||
return $this->transition->label();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function from() {
|
||||
return $this->transition->from();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function to() {
|
||||
return $this->transition->to();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function weight() {
|
||||
return $this->transition->weight();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,8 +7,8 @@ package: Testing
|
||||
dependencies:
|
||||
- workflows
|
||||
|
||||
# Information added by Drupal.org packaging script on 2017-11-03
|
||||
version: '8.4.2'
|
||||
# Information added by Drupal.org packaging script on 2018-01-03
|
||||
version: '8.4.4'
|
||||
core: '8.x'
|
||||
project: 'drupal'
|
||||
datestamp: 1509719929
|
||||
datestamp: 1515021228
|
||||
|
||||
@@ -6,8 +6,8 @@ description: 'Provides UI and API for managing workflows. This module can be use
|
||||
package: Core
|
||||
configure: entity.workflow.collection
|
||||
|
||||
# Information added by Drupal.org packaging script on 2017-11-03
|
||||
version: '8.4.2'
|
||||
# Information added by Drupal.org packaging script on 2018-01-03
|
||||
version: '8.4.4'
|
||||
core: '8.x'
|
||||
project: 'drupal'
|
||||
datestamp: 1509719929
|
||||
datestamp: 1515021228
|
||||
|
||||
Reference in New Issue
Block a user