{@inheritDoc}
@return string
3016
public function filter($content, array $options = array())
	{
		$itemTemplate = ! empty($options['itemTemplate']) ? (string) $options['itemTemplate'] : '';
		$wrapperTemplate = ! empty($options['wrapperTemplate']) ? (string) $options['wrapperTemplate'] : '';

		$output = '';

		$fileStorage = $this->container['cms.file_storage'];
		/* @var $fileStorage \Supra\Package\Cms\FileStorage\FileStorage */

		foreach ($this->blockProperty->getMetadata() as $metadata) {
			/* @var $metadata \Supra\Package\Cms\Entity\BlockPropertyMetadata */

			$element = $metadata->getReferencedElement();

			if (! $element instanceof ImageReferencedElement
					|| $element->getSizeName() === null) {

				continue;
			}

			$image = $fileStorage->findImage($element->getImageId());

			if ($image === null) {
				continue;
			}

			$previewSize = $image->getImageSize($element->getSizeName());

			if ($previewSize === null) {
				continue;
			}

			$previewUrl = $fileStorage->getWebPath($image, $previewSize);

			$crop = isset($options['fullSizeCrop']) ? (bool) $options['fullSizeCrop'] : true;

			$fullSizeWidth = ! empty($options['fullSizeMaxWidth']) ? (int) $options['fullSizeMaxWidth'] : null;
			$fullSizeHeight = ! empty($options['fullSizeMaxHeight']) ? (int) $options['fullSizeMaxWidth'] : null;

			try {

				list($width, $height) = $this->getFullSizeDimensions($image, $fullSizeWidth, $fullSizeHeight, $crop);
				$fullSizeName = $fileStorage->createResizedImage($image, $width, $height, $crop);

			} catch (FileStorageException $e) {
				$this->container->getLogger()->warn($e->getMessage());
				continue;
			}

			$fullSize = $image->getImageSize($fullSizeName);
			$fullSizeUrl = $fileStorage->getWebPath($image, $fullSize);

			$itemData = array(
				'image' 		=> '<img src="' . $previewUrl . '" alt="' . $element->getAlternateText() . '" />',
				'imageUrl' 		=> $previewUrl,
				'title' 		=> $element->getTitle(),
				'description' 	=> $element->getDescription(),

				'fullSizeUrl' 	=> $fullSizeUrl,
				'fullSizeWidth' => $fullSize->getWidth(),
				'fullSizeHeight' => $fullSize->getHeight(),
			);

			$output .= preg_replace_callback(
				'/{{\s*(image|title|description|fullSizeUrl|fullSizeWidth|fullSizeHeight)\s*}}/',
				function ($matches) use ($itemData) {
					return $itemData[$matches[1]];
				},
				$itemTemplate
			);
		}

		return preg_replace('/{{\s*items\s*}}/', $output, $wrapperTemplate);
	}
1031149
public function getAsString(): string
    {
        return implode(
            '_',
            array_filter([
                (string) $this->getLanguage(),
                (string) $this->getRegion(),
                (string) $this->getScript(),
            ])
        );
    }
748381
public function getPHP() {

        $result = '';

        // The type
        $unique = $this->getUnique();
        if (!empty($unique)) {
            $result .= 'XMLDB_INDEX_UNIQUE, ';
        } else {
            $result .= 'XMLDB_INDEX_NOTUNIQUE, ';
        }
        // The fields
        $indexfields = $this->getFields();
        if (!empty($indexfields)) {
            $result .= "['".  implode("', '", $indexfields) . "']";
        } else {
            $result .= 'null';
        }
        // Hints
        $hints = $this->getHints();
        if (!empty($hints)) {
            $result .= ", ['".  implode("', '", $hints) . "']";
        }

        // Return result
        return $result;
    }
399065
public function encode()
    {
        if (is_null($this->getParameter('value')))
            return '""';

        $value = $this->getParameter('value');
        $index = $this->getParameter('index');

        if($index != null && is_array($value))
            return JSONUtils::encode($value[$index]);

        return JSONUtils::encode($value);
    }
809461
public function getFilter()
    {
        if (false === $this->filter) {
            return '';
        }
        if (is_array($this->filter)) {
            return Form::get()->select($this->dataProvider->filtersKey . '[' . $this->name . ']', $this->filter, null, array(), '');
        }
        
        if (is_string($this->filter) && (strlen($this->filter) > 10)){
            return $this->filter;
        }
        
        return Form::get()->input($this->dataProvider->filtersKey . '[' . $this->name . ']');
    }
776767
public function getEmailSubject() : string
    {
        $result = sprintf(
            '%s: %s',
            Inflector::singularize($this->table->getAlias()),
            $this->getDisplayValue()
        );

        if (! $this->entity->isNew()) {
            $result = sprintf('(Updated) %s', $result);
        }

        return $result;
    }
876506
public function toString()
    {
        $string = '';

        if ($this->scheme) {
            $slashes = $this->isFlat() ? '' : '//';
            $string .= "{$this->scheme}:$slashes";
        }

        if ($authority = $this->getAuthority()) {
            $string .= $authority;
        }

        if ($this->path->count() && !$this->isFlat()) {
            $prefix = $authority || $this->path->getPrefix() ? '/' : '';
            $string .= $prefix.ltrim((string) $this->path, '/');
        }

        if ($this->query) {
            $string .= '?'.http_build_query($this->query);
        }

        if ($this->fragment) {
            $string .= "#{$this->fragment}";
        }

        return $string;
    }
760876
protected function getParams()
	{
		$result = "";
		foreach ($this->params as $key => $value)
		{
			if (is_numeric($key))
			{
				$result .= '--' . $value;
			}
			else
			{
				$result .= '--' . $key . ' ' . '"' . $value . '"';
			}
			$result .= ' ';
		}
		return $result;
	}
1181930
public function toString()
    {
        $email = '<' . Mime::encodeEmail($this->email()) . '>';
        $name = $this->name();
        return $name ? Mime::encodeValue($name) . ' ' . $email : $email;
    }
1217461
public function templateName()
    {
        $key = substr(strrchr('\\'.get_class($this), '\\'), 1);

        if (!isset(static::$templateNameCache[$key])) {
            $value = $key;

            if (!ctype_lower($value)) {
                $value = preg_replace('/\s+/u', '', $value);
                $value = mb_strtolower(preg_replace('/(.)(?=[A-Z])/u', '$1-', $value), 'UTF-8');
            }

            $value = str_replace(
                [ 'abstract', 'trait', 'interface', 'template', '\\' ],
                '',
                $value
            );

            static::$templateNameCache[$key] = trim($value, '-');
        }

        return static::$templateNameCache[$key];
    }
37500
public function getToString()
    {
        $get = $this->allGet();
        $formatted = array();
        foreach($get as $name => $val) {
            $formatted[] = "$name=$val";
        }

        return implode('&', $formatted);
    }
5390
public function getMethod(): string
    {
        if ($this->method === null) {
            $this->method = $this->originalMethod;
            $customMethod = $this->getHeaderLine('X-Http-Method-Override');

            if ($customMethod) {
                $this->method = $this->filterMethod($customMethod);
            } elseif ($this->originalMethod === 'POST') {
                if (($overrideMethod = $this->filterMethod($this->getParsedBodyParam('_METHOD'))) !== null) {
                    $this->method = $overrideMethod;
                }
            }
        }

        return $this->method;
    }
846140
public function toString()
    {
        $uses = $this->getIterator();
        $string = '';
        foreach ($uses as $use) {
            $string .= $use->toString();
        }

        return $string;
    }
1071825
public function name() {
		$res = $this->_match;
		$count = count($res);

		if (empty($this->_stub['name'])) {
			return '';
		}
		$name = $this->_stub['name'];

		for ($i = 1; $i <= $count; $i++) {
			$name = str_ireplace('$' . $i, $res[$i - 1], $name);
		}
		return $name;
	}
494476
protected function getServiceName(): string
    {
        return Inflector::pluralize(Inflector::tableize(substr($this->modelClass, strrpos($this->modelClass, '\\') + 1)));
    }
464124
public function toString()
    {
        $serviceLocator = $this->getServiceLocator();
        
        $config = $serviceLocator->get('Config');
        
        $configWidgets = isset($config['modules']['Grid\Core']['beforeContentWidget'])
                         ? $config['modules']['Grid\Core']['beforeContentWidget']
                         : array();
        
        foreach ( $configWidgets as $serviceClass )
        {
            $service = $serviceLocator->get( $serviceClass );
            
            if ( $service instanceof ServiceLocatorAwareInterface )
            {
                $service->setServiceLocator( $serviceLocator );
            }
            
            $this->addWidget($service);
        }
        
        $view    = $this->getView();
        $content = '';

        /* @var $widget \Grid\Core\View\BeforeContentWidget\BeforeContentWidgetInterface */
        foreach ( $this->widgets as $widget )
        {
            $content .= $widget->render($view);
        }

        return $content;
    }
1350939
public function toString() {
		Theme::singleton()->updateElementClasses( $this );
		if ( $this->isInfusable() ) {
			$this->ensureInfusableId();
		}
		return parent::toString();
	}