| | <?php |
| |
|
| | namespace Kanboard\Action; |
| |
|
| | use Kanboard\Model\TaskLinkModel; |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | class TaskAssignColorLink extends Base |
| | { |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function getDescription() |
| | { |
| | return t('Change task color when using a specific task link'); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function getCompatibleEvents() |
| | { |
| | return array( |
| | TaskLinkModel::EVENT_CREATE_UPDATE, |
| | ); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function getActionRequiredParameters() |
| | { |
| | return array( |
| | 'color_id' => t('Color'), |
| | 'link_id' => t('Link type'), |
| | ); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | public function getEventRequiredParameters() |
| | { |
| | return array( |
| | 'task_link' => array( |
| | 'task_id', |
| | 'link_id', |
| | ) |
| | ); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function doAction(array $data) |
| | { |
| | $values = array( |
| | 'id' => $data['task_link']['task_id'], |
| | 'color_id' => $this->getParam('color_id'), |
| | ); |
| |
|
| | return $this->taskModificationModel->update($values, false); |
| | } |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | public function hasRequiredCondition(array $data) |
| | { |
| | return $data['task_link']['link_id'] == $this->getParam('link_id'); |
| | } |
| | } |
| |
|