CodeExplorer cleanupElements example
if (!
$keepName) { unset($emotionData['name'
]);
} $emotionData['active'
] = false;
$requiredPlugins =
$this->
getRequiredPlugins($emotionData['elements'
]);
$emotionTranslations =
$this->
getTranslations($emotionData['elements'
],
$emotionData['id'
]);
unset($emotionData['id'
]);
$emotionData['elements'
] =
$this->
cleanupElements($emotionData['elements'
]);
$data['emotionTranslations'
] =
json_encode($emotionTranslations);
$data['requiredPlugins'
] =
$requiredPlugins;
$data['presetData'
] =
json_encode($emotionData);
return $data;
} /**
* @return array
*/
private function cleanupElements(array
$elements) {