public function admin()
{
// get configuration data for admin
if (method_exists($this, "getDataEditmode")) {
$data = $this->getDataEditmode();
} else {
$data = $this->getData();
}
$options = ["options" => $this->getOptions(), "data" => $data, "name" => $this->getName(), "id" => "pimcore_editable_" . $this->getName(), "type" => $this->getType(), "inherited" => $this->getInherited()];
$options = @\Zend_Json::encode($options, false, ['enableJsonExprFinder' => true]);
$class = "pimcore_editable pimcore_tag_" . $this->getType();
if (array_key_exists("class", $this->getOptions())) {
$class .= " " . $this->getOptions()["class"];
}
return '
<script type="text/javascript">
editableConfigurations.push(' . $options . ');
</script>
<div id="pimcore_editable_' . $this->getName() . '" class="' . $class . '"></div>
';
}