public function __construct($value, SiteMapDataService $siteData) { if (!isset($value['MenuTitle']) || strlen($value['MenuTitle']) == 0 && strlen($value['MenuTitle'])) { if (isset($value['Title'])) { $value['MenuTitle'] = $value['Title']; } } parent::__construct($value); $this->siteData = $siteData; }
public function __construct($data = array()) { foreach ($data as $k => $v) { if ($v !== null) { $data[$k] = $v; } else { unset($data[$k]); } } if (!isset($data['ID'])) { $data['ID'] = ''; } $this->record = $data; parent::__construct($data); }