Change settings into a serialized array rather than individual properties.
[project/mapboxjs.git] / includes / mapboxjs.entity.inc
1 <?php
2
3 /**
4 * Entity class for MapBox.js map presets
5 */
6 class MapboxjsPreset extends Entity {
7
8 public
9 $mapboxjs_preset_id,
10 $name,
11 $label,
12 $settings,
13 $created,
14 $updated;
15
16 public function __construct(array $values = array()) {
17 parent::__construct($values, 'mapboxjs_preset');
18 }
19
20 public function save() {
21 $this->updated = REQUEST_TIME;
22 if (isset($this->is_new) && $this->is_new) {
23 $this->created = REQUEST_TIME;
24 }
25 return parent::save();
26 }
27
28 protected function defaultUri() {
29 return array('path' => 'admin/structure/mapboxjs/presets/manage/' . $this->identifier());
30 }
31
32 }