Bundle/WidgetBundle/Resolver/BaseWidgetContentResolver.php
public function getWidgetStaticContent(Widget $widget)
    {
        $reflect = new \ReflectionClass($widget);
        $widgetProperties = $reflect->getProperties();
        $parameters = ['widget' => $widget];
        $accessor = PropertyAccess::createPropertyAccessor();

        foreach ($widgetProperties as $property) {
            if (!$property->isStatic()) {
                $value = $accessor->getValue($widget, $property->getName());
                $parameters[$property->getName()] = $value;
            }
        }

        return $parameters;
    }
public function getWidgetStaticContent(Widget $widget)
    {
        $reflect = new \ReflectionClass($widget);
        $widgetProperties = $reflect->getProperties();
        $parameters = ['widget' => $widget];
        $accessor = PropertyAccess::createPropertyAccessor();

        foreach ($widgetProperties as $property) {
            if (!$property->isStatic()) {
                $value = $accessor->getValue($widget, $property->getName());
                $parameters[$property->getName()] = $value;
            }
        }

        return $parameters;
    }
public function getWidgetStaticContent ( Widget $ widget ) { $ reflect = new \ ReflectionClass ( $ widget ) ; $ widgetProperties = $ reflect -> getProperties ( ) ; $ parameters = [ 'widget' => $ widget ] ; $ accessor = PropertyAccess :: createPropertyAccessor ( ) ; foreach ( $ widgetProperties as $ property ) { if ( ! $ property -> isStatic ( ) ) { $ value = $ accessor -> getValue ( $ widget , $ property -> getName ( ) ) ; $ parameters [ $ property -> getName ( ) ] = $ value ; } } return $ parameters ; }
Get the static content of the widget.

@param Widget $widget

@return string
Get the static content of the widget .