public function getAreasForTheme($theme = null, $keyAsValue = true)
{
$theme = $theme ? $theme : $this->getTheme();
if (!$theme) {
return false;
}
$config = $this->config()->get('themes');
if (!isset($config[$theme]['areas'])) {
return false;
}
$areas = $config[$theme]['areas'];
$areas = $keyAsValue ? ArrayLib::valuekey(array_keys($areas)) : $areas;
if (count($areas)) {
foreach ($areas as $k => $v) {
$areas[$k] = $keyAsValue ? FormField::name_to_label($k) : $v;
}
}
return $areas;
}