Conditions | 5 |
Paths | 3 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function run($property_id = null, $handler_action = null, $model_id = null) |
||
43 | { |
||
44 | if (null === $handler_action |
||
45 | || null === $property_id |
||
46 | || null === $model_id) |
||
47 | { |
||
48 | return ''; |
||
49 | } |
||
50 | |||
51 | $property = Property::findById($property_id); |
||
52 | if (null === $property) { |
||
53 | return ''; |
||
54 | } |
||
55 | |||
56 | $actionParams = [ |
||
57 | 'model_name' => $this->modelName, |
||
58 | 'model_id' => $model_id, |
||
59 | 'object_id' => $this->objectId, |
||
60 | 'property' => $property, |
||
61 | ]; |
||
62 | $propertyHandler = PropertyHandlers::createHandler($property->handler); |
||
63 | return $propertyHandler->runAction($handler_action, $actionParams); |
||
64 | } |
||
65 | } |
||
66 |