Download the PHP package neuedaten/svg-embed without Composer

On this page you can find all versions of the php package neuedaten/svg-embed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package svg-embed

SVG embed view helper for TYPO3 CMS

Fluid view helper that embeds the contents of an SVG file inline into the rendered markup, so the SVG can be styled and scripted like any other DOM element.

Requirements

Extension version TYPO3 PHP
2.x 13.4 and 14 >= 8.2
1.0.0, 0.10.x 9.5 – 12.4 >= 7.4

Install

composer req neuedaten/svg-embed

Use

Load namespace

Since version 2.0.0 the neuedaten namespace is registered globally, so this line is optional:

{namespace neuedaten=Neuedaten\SvgEmbed\ViewHelpers}

Use view helper

File:

<neuedaten:svgEmbed src="EXT:your_extension/Resources/Public/Images/filename.svg"/>

FAL:

<neuedaten:svgEmbed src="{falObject}" srcType="FAL_OBJECT"/>

Accepts both File and FileReference objects.

FAL id:

<neuedaten:svgEmbed src="{id}" srcType="FAL_ID"/>

Expects a combined identifier, e.g. 1:/user_upload/logo.svg.

ARRAY:

(an array like you get some times in a flux template) <neuedaten:svgEmbed src="{array}" srcType="ARRAY"/>

Arguments

Argument Type Default Description
src mixed – Path, FAL object, combined identifier or array (required)
srcType string PATH PATH, FAL, FAL_OBJECT, FAL_ID or ARRAY
cleanup bool false Strip comments, id attributes, the XML declaration, <script> elements, on* event handlers and javascript: hrefs

Anything that is not an .svg file, or cannot be read, renders as empty output.

Note on cleanup: the script and event handler removal is a hardening measure for editor-uploaded files. It is not a complete SVG sanitizer — do not treat it as a security boundary for untrusted input.

Upgrading to 2.0.0

Version 2.0.0 drops support for TYPO3 12 and older. The view helper was migrated from the removed renderStatic() API to render() (required by Fluid 5 in TYPO3 14), and FAL files are now read through the storage API instead of resolving their public URL to a local path.

Template syntax is unchanged — no adjustments are needed in your Fluid templates. Installations on TYPO3 12 or older should stay on 1.0.0.


All versions of svg-embed with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
typo3/cms-core Version ^13.4 || ^14.0
typo3/cms-fluid Version ^13.4 || ^14.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package neuedaten/svg-embed contains the following files

Loading the files please wait ...