Added brand data access

This commit is contained in:
Franck Allimant
2014-06-30 15:18:22 +02:00
parent 7ab306cb6c
commit a3a2b8ad8e

View File

@@ -137,6 +137,19 @@ class DataAccessFunctions extends AbstractSmartyPlugin
} }
} }
public function brandDataAccess($params, &$smarty)
{
$contentId = $this->request->get('brand_id');
if ($contentId !== null) {
$search = ContentQuery::create()
->filterById($contentId);
return $this->dataAccessWithI18n("Brand", $params, $search);
}
}
/** /**
* currency global data * currency global data
* *
@@ -462,6 +475,7 @@ class DataAccessFunctions extends AbstractSmartyPlugin
new SmartyPluginDescriptor('function', 'category', $this, 'categoryDataAccess'), new SmartyPluginDescriptor('function', 'category', $this, 'categoryDataAccess'),
new SmartyPluginDescriptor('function', 'content', $this, 'contentDataAccess'), new SmartyPluginDescriptor('function', 'content', $this, 'contentDataAccess'),
new SmartyPluginDescriptor('function', 'folder', $this, 'folderDataAccess'), new SmartyPluginDescriptor('function', 'folder', $this, 'folderDataAccess'),
new SmartyPluginDescriptor('function', 'brand', $this, 'brandDataAccess'),
new SmartyPluginDescriptor('function', 'currency', $this, 'currencyDataAccess'), new SmartyPluginDescriptor('function', 'currency', $this, 'currencyDataAccess'),
new SmartyPluginDescriptor('function', 'country', $this, 'countryDataAccess'), new SmartyPluginDescriptor('function', 'country', $this, 'countryDataAccess'),
new SmartyPluginDescriptor('function', 'lang', $this, 'langDataAccess'), new SmartyPluginDescriptor('function', 'lang', $this, 'langDataAccess'),