protected function mapElementInformation(Element $widget)
    {
        $mapping = $this->mapping['widget_mapping'];
        $widgetInfo = $widget->getInfo();

        if (! array_key_exists($widget->getXtype(), $mapping)) {
            return $widgetInfo;
        }

        $overrides = $mapping[$widget->getXtype()];

        foreach ($overrides as $attributeName => $attribInfo) {
            $isAttribute = false;

            if (array_key_exists($attributeName, $widgetInfo)) {
                // find on properties
                $value = $widgetInfo[$attributeName];
            } elseif (array_key_exists($attributeName, $widgetInfo['attributes'])) {
                // find on attributes
                $value = $widgetInfo['attributes'][$attributeName];
                $isAttribute = true;
            } else {
                // attribute or property doesn't exist on widget class
                // throw new \RuntimeException(sprintf(
                //     "Runtime Error: Attribute '%s' doesn't exist on %s widget class.",
                //     $attributeName,
                //     ucfirst($widget->getXtype())
                // ));

                continue;
            }

            // if the name of attribute has overrides
            if (array_key_exists('name', $attribInfo)) {
                // the attribute name should be overridden and the original name should be removed
                unset($widgetInfo[$attributeName]); // removing original attribute name

                // getting the override attribute name
                $attributeName = $this->processMappedWidgetInfo(
                    $widget,
                    $attribInfo['name'],
                    $value
                );
            }

            // if the value of attribute has overrides
            if (array_key_exists('value', $attribInfo)) {
                // the attribute value should be overridden by a composed structure
                $widgetInfo[$attributeName] = $this->processMappedWidgetInfo(
                    $widget,
                    $attribInfo['value'],
                    $value
                );
            }

            if ($isAttribute) {
                $widgetInfo['attributes'][$attributeName] = $widgetInfo[$attributeName];
            }/* else {
                $widgetInfo[$attributeName] = $widgetInfo[$attributeName];
            }*/

        }

        return $widgetInfo;
    }