Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
52 | public static function setRelatedDatetimes($entity, array $datetimes) |
||
53 | { |
||
54 | $relationName = 'Datetime'; |
||
55 | // Remove all the existing related datetimes |
||
56 | $entity->_remove_relations($relationName); |
||
57 | |||
58 | foreach ($datetimes as $ID) { |
||
59 | $entity->_add_relation_to( |
||
60 | $ID, |
||
61 | $relationName |
||
62 | ); |
||
63 | } |
||
64 | } |
||
65 | } |
||
66 |