Page MenuHomec4science

PhrictionActionConstants.php
No OneTemporary

File Metadata

Created
Tue, Nov 26, 14:49

PhrictionActionConstants.php

<?php
/**
* @group phriction
*/
final class PhrictionActionConstants extends PhrictionConstants {
const ACTION_CREATE = 'create';
const ACTION_EDIT = 'edit';
const ACTION_DELETE = 'delete';
const ACTION_MOVE_AWAY = 'move to';
const ACTION_MOVE_HERE = 'move here';
public static function getActionPastTenseVerb($action) {
static $map = array(
self::ACTION_CREATE => 'created',
self::ACTION_EDIT => 'edited',
self::ACTION_DELETE => 'deleted',
self::ACTION_MOVE_AWAY => 'moved a document to',
self::ACTION_MOVE_HERE => 'moved a document from',
);
return idx($map, $action, "brazenly {$action}'d");
}
}

Event Timeline