<commit_before><?php

namespace Mapbender\CoreBundle\Element;

use Mapbender\CoreBundle\Component\Element;

/**
 * Featureinfo element
 *
 * This element will provide feature info for most layer types
 *
 * @author <NAME>
 */
class FeatureInfo extends Element
{

    /**
     * @inheritdoc
     */
    public static function getClassTitle()
    {
        return "mb.core.featureinfo.class.title";
    }

    /**
     * @inheritdoc
     */
    public static function getClassDescription()
    {
        return "mb.core.featureinfo.class.description";
    }

    /**
     * @inheritdoc
     */
    public static function getClassTags()
    {
        return array(
            "mb.core.featureinfo.tag.feature",
            "mb.core.featureinfo.tag.featureinfo",
            "mb.core.featureinfo.tag.info",
            "mb.core.featureinfo.tag.dialog");
    }

    /**
     * @inheritdoc
     */
    public static function getDefaultConfiguration()
    {
        return array(
            'tooltip' => 'Feature Info Dialog',
            'type' => 'dialog',
            "autoActivate" => false,
            "deactivateOnClose" => true,
            "printResult" => false,
            "showOriginal" => false,
            "onlyValid" => false,
            "displayType" => 'tabs',
            "target" => null,
            "width" => 700,
            "height" => 500
        );<commit_msg>add default values width,height for featureinfo dialog<commit_after><?php

namespace Mapbender\CoreBundle\Element;

use Mapbender\CoreBundle\Component\Element;

/**
 * Featureinfo element
 *
 * This element will provide feature info for most layer types
 *
 * @author <NAME>
 */
class FeatureInfo extends Element
{

    /**
     * @inheritdoc
     */
    public static function getClassTitle()
    {
        return "mb.core.featureinfo.class.title";
    }

    /**
     * @inheritdoc
     */
    public static function getClassDescription()
    {
        return "mb.core.featureinfo.class.description";
    }

    /**
     * @inheritdoc
     */
    public static function getClassTags()
    {
        return array(
            "mb.core.featureinfo.tag.feature",
            "mb.core.featureinfo.tag.featureinfo",
            "mb.core.featureinfo.tag.info",
            "mb.core.featureinfo.tag.dialog");
    }

    /**
     * @inheritdoc
     */
    public function getConfiguration()
    {
        $config = parent::getConfiguration();
        if (!isset($config['width']) || !$config['width']) {
            $default = self::getDefaultConfiguration();
            $config['width'] = $default['width'];
        }

        if (!isset($config['height']) || !$config['height']) {
            $default = $default ? $default : self::getDefaultConfiguration();
            $config['height'] = $default['height'];
        }
        return $config;
    }

    /**
     * @inheritdoc
     */
    public static function getDefaultConfiguration()
    {
        return array(
            'tooltip' => 'Feature Info Dialog',
            'type' => 'dialog',
            "autoActivate" => false,
            "deactivateOnClose" => true,
            "printResult" => false,
            "showOriginal" => false,
            "onlyValid" => false,
            "displayType" => 'tabs',
            "target" => null,
            "width" => 700,
            "height" => 500
        );
{'fraction_non_alphanumeric': 0.13594263519569763, 'fraction_numerical': 0.00358530026889752, 'mean_word_length': 1.9037294015611448, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1783046', 'n_tokens_mistral': 931, 'n_tokens_neox': 914, 'n_words': 188}