### Setup all caches Source: https://neos.readthedocs.io/en/9.1/References/CommandReference.html Invokes the setup() method on all configured CacheBackends that implement the WithSetupInterface. Exits with code 1 if any cache setup fails, suitable for CI integration. Use --quiet to reduce verbosity. ```bash ./flow neos.flow:cache:setupall ``` ```bash ./flow neos.flow:cache:setupall --quiet ``` -------------------------------- ### Install Sphinx using easy_install Source: https://neos.readthedocs.io/en/9.1/Contribute/Documentation/Documentation.html Install or upgrade Sphinx using easy_install. This is an alternative method for installing Sphinx. ```bash easy_install -U sphinx ``` -------------------------------- ### Start Live HTML Documentation Server Source: https://neos.readthedocs.io/en/9.1/Contribute/Documentation/BeginnersGuide.html Run this command in the Neos.Neos/Documentation folder to start a local server that live-reloads documentation as you make changes. ```bash make livehtml ``` -------------------------------- ### Install Git and Hub Source: https://neos.readthedocs.io/en/9.1/Contribute/Documentation/BeginnersGuide.html Installs Git and the Hub command-line tool for interacting with GitHub. Use the command appropriate for your Linux distribution. ```bash sudo apt-get install git-all hub #(Debian Based) sudo pacman -Sy git hub #(Arch Linux) ``` -------------------------------- ### Setup a specific cache Source: https://neos.readthedocs.io/en/9.1/References/CommandReference.html Invokes the setup() method on a configured CacheBackend if it implements the WithSetupInterface. This is used to set up and validate the backend, such as creating necessary database tables or directories. ```bash ./flow neos.flow:cache:setup --cache-identifier ``` -------------------------------- ### Install Sphinx using pip Source: https://neos.readthedocs.io/en/9.1/Contribute/Documentation/Documentation.html Install or upgrade Sphinx using pip. This is a prerequisite for building Neos documentation locally. ```bash pip install -U sphinx ``` -------------------------------- ### ColumnView Configuration Example Source: https://neos.readthedocs.io/en/9.1/References/InspectorViewsReference/index.html Example YAML configuration for a NodeType to use the ColumnView. It specifies the data source and how to map data to the view's elements like hero and columns. ```yaml 'Vendor.Site:MyCustomNodeType': # ... ui: inspector: views: columnViewExample: label: 'ColumnView Example' group: examples view: 'Neos.Neos/Inspector/Views/Data/ColumnView' viewOptions: dataSource: vendor-site-column-view hero: data: total.uniqueVisitors label: 'visitors' columns: - data: thisWeek.uniqueVisitors label: 'this week' - data: thisMonth.uniqueVisitors label: 'this month' - data: thisMonth.growthPercent label: '% growth' # ... ``` -------------------------------- ### Install Sphinx Packages with Pip Source: https://neos.readthedocs.io/en/9.1/Contribute/Documentation/BeginnersGuide.html Installs Sphinx, sphinx-autobuild, and the sphinx_rtd_theme using pip for the current user. This makes these documentation tools available. ```bash pip install --user sphinx pip install --user sphinx-autobuild pip install --user sphinx_rtd_theme ``` -------------------------------- ### Neos.Fusion:Join Example with Complex Ordering Source: https://neos.readthedocs.io/en/9.1/References/NeosFusionReference.html Demonstrates the ordering capabilities of Neos.Fusion:Join using various @position directives like 'start', 'end', numeric, 'before', and 'after'. The order of evaluation is fixed regardless of definition order. ```fusion myString = Neos.Fusion:Join { o1 = Neos.NodeTypes:Text o1.@position = 'start 12' o2 = Neos.NodeTypes:Text o2.@position = 'start 5' o2 = Neos.NodeTypes:Text o2.@position = 'start' o3 = Neos.NodeTypes:Text o3.@position = '10' o4 = Neos.NodeTypes:Text o4.@position = '20' o5 = Neos.NodeTypes:Text o5.@position = 'before o6' o6 = Neos.NodeTypes:Text o6.@position = 'end' o7 = Neos.NodeTypes:Text o7.@position = 'end 20' o8 = Neos.NodeTypes:Text o8.@position = 'end 30' o9 = Neos.NodeTypes:Text o9.@position = 'after o8' } ``` -------------------------------- ### Basic Plugin Configuration Source: https://neos.readthedocs.io/en/9.1/References/NeosFusionReference.html Configures a plugin prototype with package and controller information. Use this for basic plugin setup. ```fusion prototype(My.Site:Registration) < prototype(Neos.Neos:Plugin) { package = 'My.Site' controller = 'Registration' } ``` -------------------------------- ### Example Nodetype for Raw Content Mode Source: https://neos.readthedocs.io/en/9.1/Appendixes/ChangeLogs/840.html This example nodetype demonstrates how to configure properties for raw content mode, including asset subtypes like Video, Document, and Audio, with specific UI and inspector settings. ```yaml Neos.Demo:Content.Test: superTypes: 'Neos.Neos:Content': true 'Neos.Demo:Constraint.Content.Column': true 'Neos.Demo:Constraint.Content.Main': true ui: label: Test icon: picture position: start inspector: groups: settings: label: Test Settings properties: video: type: Neos\Media\Domain\Model\Video ui: label: 'Video' reloadIfChanged: true showInCreationDialog: true inspector: group: 'settings' editor: Neos.Neos/Inspector/Editors/AssetEditor document: type: Neos\Media\Domain\Model\Document ui: label: Document inspector: group: 'settings' editor: Neos.Neos/Inspector/Editors/AssetEditor audio: type: Neos\Media\Domain\Model\Audio ui: label: Audio inspector: group: 'settings' editor: Neos.Neos/Inspector/Editors/AssetEditor ``` -------------------------------- ### Configure NodeInfoView Source: https://neos.readthedocs.io/en/9.1/References/InspectorViewsReference/index.html Example configuration for manually setting up a NodeInfoView for a custom node type. This is rarely needed as NodeInfoView is pre-configured for most nodes. ```yaml 'Vendor.Site:MyCustomNodeType': # ... ui: inspector: views: nodeInfoViewExample: label: 'NodeInfoView example' group: examples view: 'Neos.Neos/Inspector/Views/NodeInfoView' # ... ``` -------------------------------- ### Form with GET Method Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/FluidAdaptor.html Outputs an HTML form tag configured to use the GET method for submission. ```html ... ``` ```html
...
``` -------------------------------- ### Basic MenuItems Configuration Source: https://neos.readthedocs.io/en/9.1/References/NeosFusionReference.html Configures MenuItems to start at entry level 1 and limit depth to 3 levels. ```fusion menuItems = Neos.Neos:MenuItems { entryLevel = 1 maximumLevels = 3 } ``` -------------------------------- ### Configure Additional Resources for All Backend Modules Source: https://neos.readthedocs.io/en/9.1/Appendixes/ReleaseNotes/830.html Example of how to include additional stylesheets and JavaScript files for all backend modules simultaneously by configuring them in `Neos.Neos.moduleConfiguration.additionalResources`. ```yaml Neos: moduleConfiguration: additionalResources: styleSheets: ‘My.Package’: ‘resource://My.Package/Public/JavaScript/Main.css’ javaScripts: ‘My.Package’: ‘resource://My.Package/Public/JavaScript/Main.js’ ``` -------------------------------- ### MenuItems with Custom Starting Point Source: https://neos.readthedocs.io/en/9.1/References/NeosFusionReference.html Configures MenuItems with a specific starting point (a node with URI segment 'metamenu') and limits the depth to 1 level. ```fusion menuItems = Neos.Neos:MenuItems { entryLevel = 2 maximumLevels = 1 startingPoint = ${q(site).children('[uriPathSegment="metamenu"]').get(0)} } ``` -------------------------------- ### Install Atom Editor on Arch Linux Source: https://neos.readthedocs.io/en/9.1/Contribute/Documentation/BeginnersGuide.html Installs the Atom text editor using the yaourt package manager on Arch Linux. Refer to the Atom GitHub repository for other distributions. ```bash yaourt atom-editor #(Arch Linux) ``` -------------------------------- ### Link Editor Configuration Example Source: https://neos.readthedocs.io/en/9.1/Appendixes/ChangeLogs/911.html Configuration snippet showing legacy options for the inline link editor, which should be rewritten using the new `linkTypes` declaration. ```yaml inline: editorOptions: linking: * anchor: true title: true relNofollow: true targetBlank: true ``` -------------------------------- ### Basic Checkbox Example Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/FluidAdaptor.html Generates a simple HTML checkbox input. This is the most basic usage of the ViewHelper. ```html ``` -------------------------------- ### Grouped Loop Simple Example Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/TYPO3Fluid.html Demonstrates a simple grouped loop using the f:groupedFor ViewHelper. It iterates over a list of fruits and groups them by color. ```fluid {fruit.name} ``` -------------------------------- ### f:first ViewHelper Example Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/TYPO3Fluid.html The f:first ViewHelper returns the first item of an array. It takes a 'value' argument which is the array to process. ```html ``` ```text first ``` -------------------------------- ### Commit Message Structure Example Source: https://neos.readthedocs.io/en/9.1/Contribute/Documentation/BeginnersGuide.html Illustrates the standard format for commit messages, including type, summary, detailed explanation, and issue tracking footers. ```text TASK: Short (50 chars or less) summary of changes More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together. Write your commit message in the present tense: “Fix bug” and not “Fixed bug.” This convention matches up with commit messages generated by commands like git merge and git revert. Further paragraphs come after blank lines. * Bullet points are okay, too * An asterisk is used for the bullet, it can be preceded by a single space. This format is rendered correctly by Forge (redmine) * Use a hanging indent A first step in solving neos/flow-development-collection#789. Fixes #123 Closes #456 ``` -------------------------------- ### Array.every Example Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Checks if all elements in an array satisfy a condition defined by a callback function. The callback receives the element and its key. ```javascript Array.every([1, 2, 3, 4], x => x % 2 == 0) // == false Array.every([2, 4, 6, 8], x => x % 2) // == true ``` -------------------------------- ### Create Link to Action (Defaults) Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/FluidAdaptor.html Generates a link to the current package, controller, and action. The exact output depends on the routing setup. ```html some link Expected result: some link (depending on routing setup and current package/controller/action) ``` -------------------------------- ### Autocomplete ViewHelper Setup Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/FluidAdaptor.html Include jQuery and jQuery UI libraries and CSS for the Autocomplete ViewHelper to function correctly. This is essential for the widget's frontend behavior. ```html ``` -------------------------------- ### Deprecate Fusion Namespaces - Alias example Source: https://neos.readthedocs.io/en/9.1/Appendixes/ReleaseNotes/730.html Illustrates the deprecated method of aliasing Fusion namespaces. Starting with Neos 8, this syntax will no longer work and requires full namespace declaration. ```yaml namespace: Foo = Acme.Demo video = Foo:YouTube ``` -------------------------------- ### ColumnViewDataSource Implementation Source: https://neos.readthedocs.io/en/9.1/References/InspectorViewsReference/index.html Example PHP class implementing a data source for the ColumnView. It extends AbstractDataSource and provides data for visitor statistics. ```php [ 'total' => [ 'uniqueVisitors' => 250000, ], 'thisWeek' => [ 'uniqueVisitors' => 786, 'growthPercent' => 25, ], 'thisMonth' => [ 'uniqueVisitors' => 2048, 'growthPercent' => 25, ] ] ]; } } ``` -------------------------------- ### f:for Simple Loop Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/TYPO3Fluid.html The f:for ViewHelper iterates over an array, similar to a PHP foreach loop. This example shows a simple loop outputting each element. ```html {foo} ``` ```text 1234 ``` -------------------------------- ### Start Live HTML Server with To-Do Items Included Source: https://neos.readthedocs.io/en/9.1/Contribute/Documentation/BeginnersGuide.html Use this command to include 'todo' items in the live-reloading documentation, useful for tracking outstanding tasks. ```bash make livehtml SPHINXOPTS="-D todo_include_todos=1" ``` -------------------------------- ### Install Python Pip Source: https://neos.readthedocs.io/en/9.1/Contribute/Documentation/BeginnersGuide.html Installs the Python Package Installer (pip) on Arch Linux systems. Pip is required to install Python packages like Sphinx. ```bash sudo pacman -S python-pip ``` -------------------------------- ### Setup Content Repository Projection and Replay Subscription Source: https://neos.readthedocs.io/en/9.1/Appendixes/ChangeLogs/911.html Command to set up a new content repository projection and replay its subscription, useful for enabling new functionality like the trash bin projection. ```bash ./flow cr:setup ./flow subscription:replay Neos.Workspace.Ui:TrashBinProjection ``` -------------------------------- ### View Makefile commands Source: https://neos.readthedocs.io/en/9.1/Contribute/Documentation/Documentation.html Navigate to the documentation directory and run 'make help' to see available commands for building the documentation. ```bash cd Neos.Neos/Documentation make help ``` -------------------------------- ### YAML Configuration for Child Node Labels Source: https://neos.readthedocs.io/en/9.1/Appendixes/ChangeLogs/911.html Example of a YAML file defining content elements with child nodes, specifying their types and labels for translation. ```yaml ‘Neos.Demo:Content.Columns.Two’: > … childNodes: >> column0: >> type: ‘Neos.Demo:Collection.Content.Column’ label: i18n column1: >> type: ‘Neos.Demo:Collection.Content.Column’ label: i18n ``` -------------------------------- ### Neos.Fusion:Renderer: Basic Value Rendering Source: https://neos.readthedocs.io/en/9.1/References/NeosFusionReference.html Evaluates to a result using 'renderer', 'renderPath', or 'type'. This example demonstrates rendering a simple string value. ```fusion myCase = Neos.Fusion:Renderer { type = 'Neos.Fusion:Value' element.value = 'hello World' } ``` -------------------------------- ### Test String Starts With Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Checks if a string begins with a specified search string. An optional position can be provided to start the search from. ```eel String.startsWith('Hello world!', 'Hello') == true ``` ```eel String.startsWith('My hovercraft is full of...', 'Hello') == false ``` ```eel String.startsWith('My hovercraft is full of...', 'hovercraft', 3) == true ``` -------------------------------- ### PHP String Literal Example Source: https://neos.readthedocs.io/en/9.1/References/CodingGuideLines/PHP.html Use single quotes for literal strings in PHP. This example shows a basic string assignment. ```php $neos = 'A great project from a great team'; ``` -------------------------------- ### Show Help for Specific Command Source: https://neos.readthedocs.io/en/9.1/Operations/CommandLine.html Displays detailed usage information, arguments, options, and description for a specific command, such as 'neos.neos:user:addrole'. ```bash ./flow help user:addrole Add a role to a user COMMAND: neos.neos:user:addrole USAGE: ./flow user:addrole [] ARGUMENTS: --username The username of the user --role Role to be added to the user, for example "Neos.Neos:Administrator" or just "Administrator OPTIONS: --authentication-provider Name of the authentication provider to use. Example: "Neos.Neos:Backend DESCRIPTION: This command allows for adding a specific role to an existing user. Roles can optionally be specified as a comma separated list. For all roles provided by Neos, the role namespace "Neos.Neos:" can be omitted. If an authentication provider was specified, the user will be determined by an account identified by "username" related to the given provider. However, once a user has been found, the new role will be added to all existing accounts related to that user, regardless of its authentication provider. ``` -------------------------------- ### List Available Commands Source: https://neos.readthedocs.io/en/9.1/Operations/CommandLine.html Lists all available commands, commands within a specific package, or detailed help for a specific command. ```bash ./flow help # lists all available command ./flow help # lists commands provided in package ./flow help # show help for specific command ``` -------------------------------- ### MariaDB 12 Record Changed Exception Example Source: https://neos.readthedocs.io/en/9.1/Appendixes/ChangeLogs/916.html Example of an exception encountered with MariaDB 12 when a record has changed since the last read, impacting parallel operations. ```text Got exception DriverException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1020 Record has changed since last read in table ‘cr_test_parallel_p_graph_contentstream’ ``` -------------------------------- ### Standard Method Documentation Block Source: https://neos.readthedocs.io/en/9.1/References/CodingGuideLines/PHP.html Document methods by specifying parameters and return values. Ensure all parameters and the return type (even if void) are documented. ```php /** * A description for this method * * Paragraphs are separated by an empty line. * * @param \Neos\Blog\Domain\Model\Post $post A post * @param string $someString This parameter should contain some string * @return void */ public function addStringToPost(\Neos\Blog\Domain\Model\Post $post, $someString) { ... } ``` -------------------------------- ### Configure Aspect Ratio Presets and Customization Source: https://neos.readthedocs.io/en/9.1/References/PropertyEditorReference.html Set up predefined aspect ratio options, enable the original image ratio, and allow users to define custom aspect ratios. ```yaml 'teaserImage': type: 'Neos\Media\Domain\Model\ImageInterface' ui: label: 'Teaser Image' inspector: group: 'document' editorOptions: constraints: mediaTypes: ['image/png'] features: crop: true crop: aspectRatio: options: square: width: 1 height: 1 label: 'Square' fourFive: width: 4 height: 5 # disable this ratio (if it was defined in a supertype) fiveSeven: ~ enableOriginal: true allowCustom: true ``` -------------------------------- ### Array.length Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Gets the number of elements in an array. ```APIDOC ## Array.length(array) ### Description Get the length of an array. ### Parameters #### Path Parameters - **array** (iterable) - Required - The array ### Return (int) The length of the array ``` -------------------------------- ### PHP: Initialize Asset Sources via createFromConfiguration Source: https://neos.readthedocs.io/en/9.1/Appendixes/ChangeLogs/840.html Ensures asset sources are consistently initialized using the `createFromConfiguration` static factory method. This resolves issues with value object validation in asset source options. ```php final class MyAssetSource implements AssetSourceInterface { public function __construct( private readonly string $assetSourceIdentifier, private readonly Options $options ) { } /* … */ #### } ``` ```php final class MyAssetSource implements AssetSourceInterface { /* … */ public static function createFromConfiguration(string $assetSourceIdentifier, array $assetSourceOptions): AssetSourceInterface { return new static( $assetSourceIdentifier, Options::fromArray($assetSourceOptions) ); } #### } ``` -------------------------------- ### Create User with Administrative Privileges Source: https://neos.readthedocs.io/en/9.1/Operations/CommandLine.html Creates a new user with the specified email, password, name, and assigns administrative roles. ```bash ./flow user:create john@doe.com pazzw0rd John Doe --roles Neos.Neos:Administrator ``` -------------------------------- ### Neos.Neos:ImageUri Source: https://neos.readthedocs.io/en/9.1/References/NeosFusionReference.html Get a URI to a (thumbnail) image for an asset. ```APIDOC ## Neos.Neos:ImageUri ### Description Get a URI to a (thumbnail) image for an asset. ### Parameters #### Path Parameters - **asset** (Asset) - Required - An asset object (`Image`, `ImageInterface` or other `AssetInterface`) - **width** (integer) - Optional - Desired width of the image - **maximumWidth** (integer) - Optional - Desired maximum height of the image - **height** (integer) - Optional - Desired height of the image - **maximumHeight** (integer) - Optional - Desired maximum width of the image - **allowCropping** (boolean) - Optional - Whether the image should be cropped if the given sizes would hurt the aspect ratio, defaults to `FALSE` - **allowUpScaling** (boolean) - Optional - Whether the resulting image size might exceed the size of the original image, defaults to `FALSE` - **async** (boolean) - Optional - Return asynchronous image URI in case the requested image does not exist already, defaults to `FALSE` - **quality** (integer) - Optional - Image quality, from 0 to 100 - **format** (string) - Optional - Format for the image, jpg, jpeg, gif, png, wbmp, xbm, webp and bmp are supported - **preset** (string) - Optional - Preset used to determine image configuration, if set all other resize attributes will be ignored ### Request Example ```fusion logoUri = Neos.Neos:ImageUri { asset = ${q(node).property('image')} width = 100 height = 100 allowCropping = TRUE allowUpScaling = TRUE } ``` ``` -------------------------------- ### Get String Length Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Returns the total number of characters in a string. -------------------------------- ### Example Node Migration Configuration Source: https://neos.readthedocs.io/en/9.1/References/NodeMigrations.html This YAML configuration defines a node migration. It selects all nodes of type 'Neos.ContentRepository.Testing:Document' and renames a property named 'text' to 'newText'. Place such files in the 'Migrations/ContentRepository' folder of a package. ```yaml comments: 'Rename the property of all Neos.ContentRepository.Testing:Document nodes' migration: - filters: - type: 'NodeType' settings: nodeType: 'Neos.ContentRepository.Testing:Document' transformations: - type: 'RenameProperty' settings: from: 'text' to: 'newText' ``` -------------------------------- ### Translation.value Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Starts the collection of parameters for translation by providing an original label. ```APIDOC ## Translation.value(value) ### Description Starts collection of parameters for translation by original label. ### Parameters #### Path Parameters - **value** (string) - Required - The original label to use for translation. ### Return (TranslationParameterToken) ``` -------------------------------- ### Format Currency with All Parameters Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/FluidAdaptor.html Demonstrates formatting a number with all available parameters for currency, including custom currency sign, separators, and decimal places. ```fluid 54321 ``` -------------------------------- ### Translation.id Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Starts the collection of parameters for translation by providing a translation ID. ```APIDOC ## Translation.id(id) ### Description Starts collection of parameters for translation by id. ### Parameters #### Path Parameters - **id** (string) - Required - Id to use for finding translation (trans-unit id in XLIFF) ### Return (TranslationParameterToken) ``` -------------------------------- ### String.substring Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Extracts characters from a string between a start and an optional end index. ```APIDOC ## String.substring(string, start, end) ### Description Return the characters in a string from a start index to an end index. ### Parameters #### Path Parameters - **string** (string) - Required. - **start** (integer) - Required - Start index. - **end** (integer) - Optional - End index. ### Return (string) The substring. ### Example ``` String.substring('Hello, World!', 7, 12) == 'World' String.substring('Hello, World!', 7) == 'World!' ``` ``` -------------------------------- ### f:security.ifHasRole Example Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/FluidAdaptor.html This view helper implements an ifHasRole/else condition. ```fluid ``` -------------------------------- ### Usable nodeTypes:show command with level option Source: https://neos.readthedocs.io/en/9.1/Appendixes/ChangeLogs/840.html Demonstrates the usage of the `nodeTypes:show` command with the new `level` option to clamp the input, making it more useful for larger nodetypes. It also shows an example of how to display NodeType configuration. ```bash flow nodeTypes:show Neos.Demo:Document.Homepage –path properties –level 1 ``` ```yaml NodeType configuration “Neos.Demo:Document.Homepage.properties”: _removed: … _creationDateTime: … _lastModificationDateTime: … _lastPublicationDateTime: … _path: … _name: … _nodeType: … _hidden: … _hiddenBeforeDateTime: … _hiddenAfterDateTime: … titleOverride: … metaDescription: … … ``` -------------------------------- ### f:security.ifAuthenticated Example Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/FluidAdaptor.html This view helper implements an ifAuthenticated/else condition. ```fluid ``` -------------------------------- ### String.substr Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Extracts a portion of a string starting from a specified offset up to a given length. ```APIDOC ## String.substr(string, start, length) ### Description Return the characters in a string from start up to the given length. ### Parameters #### Path Parameters - **string** (string) - Required - A string. - **start** (integer) - Required - Start offset. - **length** (integer) - Optional - Maximum length of the substring that is returned. ### Return (string) The substring. ### Example ``` String.substr('Hello, World!', 7, 5) == 'World' String.substr('Hello, World!', 7) == 'World!' String.substr('Hello, World!', -6) == 'World!' ``` ``` -------------------------------- ### neos.neos:site:create Source: https://neos.readthedocs.io/en/9.1/References/CommandReference.html Creates a new site with a specified name and package key. Optionally configure node type, node name, and activation status. ```APIDOC ## neos.neos:site:create ### Description Create a new site. This command allows to create a blank site with just a single empty document in the default dimension. The name of the site, the packageKey must be specified. The node type given with the `nodeType` option must already exists and have the superType `Neos.Neos:Document`. If no `nodeName` option is specified the command will create a unique node-name from the name of the site. If a node name is given it has to be unique for the setup. If the flag `activate` is set to false new site will not be activated. ### Arguments #### --name (string) - Required - The name of the site #### --package-key (string) - Required - The site package #### --node-type (string) - Required - The node type to use for the site node, e.g. Amce.Com:Page ### Options #### --node-name (string) - Optional - The name of the site node. #### --inactive (boolean) - Optional - The new site is not activated immediately (default = false) ``` -------------------------------- ### Linking to Backend Modules with ActionUri Source: https://neos.readthedocs.io/en/9.1/Appendixes/ReleaseNotes/810.html Demonstrates using Neos.Fusion:ActionUri to create links to specific backend modules, such as the content module or sites module, by specifying the request context. ```Fusion cotentModuleUri = Neos.Fusion:ActionUri { request = ${request.mainRequest} package =”Neos.Neos.Ui” controller = “Backend” action = ‘index’ arguments.node = ${documentNode} #### } ``` ```Fusion siteModuleUri = Neos.Fusion:ActionUri { request = ${request.mainRequest} action = “index” package = “Neos.Neos” controller = “Backend\Module” arguments { module = ‘administration/sites’ moduleArguments { @action = ‘edit’ site = ${site} } } #### } ``` -------------------------------- ### Get Current Timestamp Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Retrieve the current date and time, and access its timestamp property. ```Eel Date.now().timestamp ``` -------------------------------- ### String.indexOf Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Finds the first occurrence of a substring within a string, starting from a specified index. ```APIDOC ## String.indexOf(string, search, fromIndex) ### Description Find the first position of a substring in the given string. Example: ``` String.indexOf("Blue Whale", "Blue") == 0 ``` ### Parameters #### Path Parameters - **string** (string) - Required - The input string - **search** (string) - Required - The substring to search for - **fromIndex** (integer) - Optional - The index where the search should start, defaults to the beginning ### Return (integer) The index of the substring (>= 0) or -1 if the substring was not found ``` -------------------------------- ### Array.unshift Example Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Inserts one or more elements at the beginning of an array. Multiple elements can be inserted at once. ```javascript Array.unshift(array, e1, e2) ``` -------------------------------- ### Show Active Configuration Settings Source: https://neos.readthedocs.io/en/9.1/References/CommandReference.html Displays the active configuration settings for the current context. You can specify the type and path to view specific parts of the configuration. ```bash ./flow configuration:show ``` ```bash ./flow configuration:show --path Neos.Flow.persistence ``` ```bash ./flow configuration:show --type Caches --path Flow_Object_Classes ``` -------------------------------- ### Get Character at Index Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Retrieves the character at a specific index within a string. Indexes are zero-based. ```Eel String.charAt("abcdefg", 5) == "f" ``` -------------------------------- ### Array.range Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Creates an array containing a sequence of elements with a specified start, end, and an optional step. ```APIDOC ## Array.range(start, end, step) ### Description Create an array containing a range of elements. If a step value is given, it will be used as the increment between elements in the sequence. step should be given as a positive number. If not specified, step will default to 1. ### Parameters * `start` (mixed) - First value of the sequence. * `end` (mixed) - The sequence is ended upon reaching the end value. * `step` (int, _optional_) - The increment between items, will default to 1. ### Return (array) Array of elements from start to end, inclusive. ``` -------------------------------- ### Render Image As-Is with Neos Media ViewHelper Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/Media.html Use this ViewHelper to render an tag for a given image object without any scaling. Ensure the `image` object and `alt` text are provided. ```html ``` -------------------------------- ### Basic Checkbox Example Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/Media.html Generates a simple HTML checkbox input. Use this for standard checkbox functionality. ```html ``` -------------------------------- ### Neos.Fusion:Join Example with Numeric Keys (Discouraged) Source: https://neos.readthedocs.io/en/9.1/References/NeosFusionReference.html Illustrates the use of numeric keys for ordering in Neos.Fusion:Join. This method is discouraged in favor of using @position and meaningful keys. ```fusion myString = Neos.Fusion:Join { 10 = Neos.NodeTypes:Text 20 = Neos.NodeTypes:Text } ``` -------------------------------- ### List all configured caches Source: https://neos.readthedocs.io/en/9.1/References/CommandReference.html Lists all configured caches and their status. Exits with code 1 if any cache status contains errors or warnings, making it suitable for CI integration. Use --quiet to reduce verbosity. ```bash ./flow neos.flow:cache:list ``` ```bash ./flow neos.flow:cache:list --quiet ``` -------------------------------- ### neos.neos:site:importall Source: https://neos.readthedocs.io/en/9.1/References/CommandReference.html Imports sites from a specified path or package. The format must match the output of exportAll. The live workspace must be empty before importing. ```APIDOC ## neos.neos:site:importall ### Description Import sites. This command allows importing sites from the given path/package. The format must be identical to that produced by the exportAll command. If a path is specified, this command expects the corresponding directory to contain the exported files If a package key is specified, this command expects the export files to be located in the private resources directory of the given package (Resources/Private/Content). **Note that the live workspace has to be empty prior to importing.** ### Options #### --package-key (string) - Optional - Package key specifying the package containing the sites content #### --path (string) - Optional - relative or absolute path and filename to the export files #### --content-repository (string) - Optional - contentRepository #### --verbose (boolean) - Optional - verbose ``` -------------------------------- ### Get Object Identifier Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/FluidAdaptor.html Renders the identifier of a persisted object. Defaults to using VH children if no value is provided. ```fluid {object -> f:format.identifier()} ``` -------------------------------- ### Translate with Interface Language Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Use the Neos.Backend.interfaceLanguage() helper to get the user's selected interface language for translations. ```fusion Translation.id("mh").locale(Neos.Backend.interfaceLanguage()).translate() ``` -------------------------------- ### Configure References Editor with Node Type and Create New Option Source: https://neos.readthedocs.io/en/9.1/References/PropertyEditorReference.html This example configures the References editor to allow 'My.Website:Tag' nodes and enables creating new tags directly within the editor. Specify the path and type for new node creation. ```yaml tags: type: references ui: label: 'Tags' inspector: group: document editorOptions: nodeTypes: ['My.Website:Tag'] createNew: path: //yoursite/tags type: 'My.Website:Tag' ``` -------------------------------- ### Plugin Configuration with Action and Argument Source: https://neos.readthedocs.io/en/9.1/References/NeosFusionReference.html Configures a plugin prototype including a specific action and an additional argument. This allows for more targeted plugin execution. ```fusion prototype(My.Site:Registration) < prototype(Neos.Neos:Plugin) { package = 'My.Site' controller = 'Registration' action = 'register' additionalArgument = 'foo' } ``` -------------------------------- ### Get Configuration Setting Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Retrieves a specific configuration setting using its path. Useful for accessing application-level configurations. ```eel Configuration.setting('Neos.Flow.core.context') == 'Production' ``` ```eel Configuration.setting('Acme.Demo.speedMode') == 'light speed' ``` -------------------------------- ### Execute Manual Subscription Catch-up Command Source: https://neos.readthedocs.io/en/9.1/Appendixes/ChangeLogs/9013.html Provides a command-line interface to manually trigger a catch-up for the subscription engine. This is useful for recovery scenarios where events might not have been processed due to connection issues or process termination. It ensures that the event store is synchronized with the subscription state. ```php public function catchUpActiveCommand(string $contentRepository = ‘default’): void { $subscriptionEngineAccessor = new class implements ContentRepositoryServiceFactoryInterface { public SubscriptionEngine|null $subscriptionEngine; public function build(ContentRepositoryServiceFactoryDependencies $serviceFactoryDependencies): ContentRepositoryServiceInterface { $this->subscriptionEngine = $serviceFactoryDependencies->subscriptionEngine; return new class implements ContentRepositoryServiceInterface { }; } }; $this->contentRepositoryRegistry->buildService(ContentRepositoryId::fromString($contentRepository), $subscriptionEngineAccessor); $subscriptionEngine = $subscriptionEngineAccessor->subscriptionEngine; $subscriptionEngine->catchUpActive(); } ``` -------------------------------- ### f:split ViewHelper with Separator Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/TYPO3Fluid.html Splits a string by a specified separator into an array. This example uses a comma as the separator. ```fluid ``` -------------------------------- ### Array.splice Example Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Replaces a specified range of elements in an array with new elements. Multiple replacement elements can be provided. ```javascript Array.splice(array, 3, 2, 'a', 'b') ``` -------------------------------- ### Invoke Manual Catch-up for Subscriptions Source: https://neos.readthedocs.io/en/9.1/Appendixes/ChangeLogs/916.html Use this command to manually trigger a catch-up process for subscriptions. Ensure you are in the project root directory. ```bash ./flow subscription:catchUpActive ``` -------------------------------- ### Array.push Example Source: https://neos.readthedocs.io/en/9.1/References/EelHelpersReference.html Inserts one or more elements at the end of an array. This function allows for pushing multiple elements simultaneously. ```javascript Array.push(array, e1, e2) ``` -------------------------------- ### Get Last Item of Array with f:last Source: https://neos.readthedocs.io/en/9.1/References/ViewHelpers/TYPO3Fluid.html Use the f:last ViewHelper to retrieve the last element from an array. ```fluid ``` ```text second ```