### Install Sphinx using easy_install Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/Documentation.html Install Sphinx, a documentation generator, using easy_install. Ensure you have easy_install installed. ```bash easy_install -U Sphinx ``` -------------------------------- ### Setup All Caches Source: https://neos.readthedocs.io/en/8.3/_sources/References/CommandReference.rst.txt Invokes the setup() method on all configured CacheBackends that implement the WithSetupInterface. Exits with code 1 if any cache setup fails, making it suitable for CI integration. The --quiet flag can be used to suppress non-error output. ```bash ./flow neos.flow:cache:setupall ``` ```bash ./flow neos.flow:cache:setupall --quiet ``` -------------------------------- ### Install Sphinx using pip Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/Documentation.html Install Sphinx, a documentation generator, using pip. Ensure you have pip installed. ```bash pip install -U Sphinx ``` -------------------------------- ### Setup a Specific Cache Source: https://neos.readthedocs.io/en/8.3/_sources/References/CommandReference.rst.txt 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 Flow_Object_Classes ``` -------------------------------- ### Menu with Custom Starting Point Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Configure a menu to start at entry level 2 and have a maximum of 1 level, with a specific starting point node identified by its URI path segment. ```fusion menu = Neos.Neos:Menu { entryLevel = 2 maximumLevels = 1 startingPoint = ${q(site).children('[uriPathSegment="metamenu"]').get(0)} } ``` -------------------------------- ### Install sass and compass gems Source: https://neos.readthedocs.io/en/8.3/Contribute/Code/EmberUI.html Installs the Sass and Compass gems for CSS preprocessing. ```bash sudo gem install sass compass ``` -------------------------------- ### Install development dependencies Source: https://neos.readthedocs.io/en/8.3/Contribute/Code/EmberUI.html Installs Node.js, Bundler, and Bower dependencies required for development. ```bash npm install bundle install --binstubs --path bundle bower install ``` -------------------------------- ### Install Git and Hub Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/BeginnersGuide.html Installs git and hub on Debian-based and Arch Linux systems. ```shell sudo apt-get install git-all hub #(Debian Based) sudo pacman -Sy git hub #(Arch Linux) ``` -------------------------------- ### NodeInfoView Configuration Example Source: https://neos.readthedocs.io/en/8.3/_sources/References/InspectorViewsReference/index.rst.txt An example YAML configuration for the NodeInfoView, which displays key characteristics of a Neos node. ```yaml inspector: views: meta: label: 'Meta Information' view: 'Neos.Neos/Inspector/Views/NodeInfoView' ``` -------------------------------- ### Install Redirect Handler Database Storage Source: https://neos.readthedocs.io/en/8.3/Appendixes/ReleaseNotes/220.html Install the default database storage package for the Redirect Handler using Composer. ```bash composer require "neos/redirecthandler-databasestorage" ``` -------------------------------- ### Configure Preferred Start Modules in Neos Source: https://neos.readthedocs.io/en/8.3/Appendixes/ReleaseNotes/700.html Set the preferred start modules for users after login. The system will redirect to the first accessible module in the list. ```yaml Neos: Neos: moduleConfiguration: preferredStartModules: ['content', 'management/custom'] ``` -------------------------------- ### Install Redirect Handler Package Source: https://neos.readthedocs.io/en/8.3/Appendixes/ReleaseNotes/220.html Install the Neos Redirect Handler package for Neos using Composer. ```bash composer require "neos/redirecthandler-neosadapter" ``` -------------------------------- ### Build documentation Source: https://neos.readthedocs.io/en/8.3/Contribute/Code/EmberUI.html Renders the documentation. This task depends on a local installation of Omnigraffle. ```bash grunt build-docs ``` -------------------------------- ### Install bower globally Source: https://neos.readthedocs.io/en/8.3/Contribute/Code/EmberUI.html Installs Bower, a package manager for the web, globally. ```bash sudo npm install -g bower ``` -------------------------------- ### Install grunt-cli globally Source: https://neos.readthedocs.io/en/8.3/Contribute/Code/EmberUI.html Installs the Grunt command-line interface globally on your system. ```bash sudo npm install -g grunt-cli ``` -------------------------------- ### Install Atom Editor on Arch Linux Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/BeginnersGuide.html Installs the Atom editor using yaourt on Arch Linux. ```shell yaourt atom-editor #(Arch Linux) ``` -------------------------------- ### Install Neos UI Packages Source: https://neos.readthedocs.io/en/8.3/Appendixes/ReleaseNotes/330.html Add the Neos UI and its compiled assets to your project using Composer. Run 'composer update' to install the packages. ```bash composer require --no-update "neos/neos-ui:~1.0.0" composer require --no-update "neos/neos-ui-compiled:~1.0.0" composer update ``` -------------------------------- ### Fusion Example with Fluent Interface (Pre-8.3) Source: https://neos.readthedocs.io/en/8.3/_sources/Appendixes/ChangeLogs/833.rst.txt This example demonstrates the fluent interface API for EelHelpers with attributes that was functional in Neos versions prior to 8.3. It shows how attributes like 'class' could be set using a chained method call. ```fusion class={[block.element('subline').modifier('light')]} ``` -------------------------------- ### Install Sphinx Packages with Pip Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/BeginnersGuide.html Installs Sphinx, sphinx-autobuild, and sphinx_rtd_theme using pip for the current user. ```shell pip install --user Sphinx pip install --user sphinx-autobuild pip install --user sphinx_rtd_theme ``` -------------------------------- ### MenuItems with Custom Starting Point Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Sets a custom starting point for the menu and defines the entry level and maximum levels relative to that point. ```fusion menuItems = Neos.Neos:MenuItems { entryLevel = 2 maximumLevels = 1 startingPoint = ${q(site).children('[uriPathSegment="metamenu"]').get(0)} } ``` -------------------------------- ### NodeInfoView Example Configuration Source: https://neos.readthedocs.io/en/8.3/_sources/References/InspectorViewsReference/index.rst.txt Configuration for a NodeInfoView within the inspector. This view does not have specific view options. ```yaml Vendor.Site:MyCustomNodeType: # ... ui: inspector: views: nodeInfoViewExample: label: 'NodeInfoView example' group: examples view: 'Neos.Neos/Inspector/Views/NodeInfoView' # ... ``` -------------------------------- ### Simple f:cycle example Source: https://neos.readthedocs.io/en/8.3/References/ViewHelpers/TYPO3Fluid.html The f:cycle ViewHelper iterates through a list of values, assigning each value to the 'cycle' variable in turn. This example demonstrates its basic usage within a loop. ```fluid {cycle} ``` -------------------------------- ### Serve Neos Documentation Live Source: https://neos.readthedocs.io/en/8.3/_sources/Contribute/Documentation/BeginnersGuide.rst.txt Navigate to the Neos.Neos/Documentation directory and run 'make livehtml' to serve the documentation locally. This command starts a live-reloading server. ```bash cd /neos-development-collection/Neos.Neos/Documentation/ make livehtml ``` -------------------------------- ### Neos.Fusion:Join Example with Explicit Ordering Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Demonstrates how to use Neos.Fusion:Join with explicit @position properties to control the order of nested definitions. This example showcases various ordering strategies including 'start', numeric, 'before', and 'after'. ```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' } ``` -------------------------------- ### Deprecate Fusion Namespaces - Alias Example Source: https://neos.readthedocs.io/en/8.3/Appendixes/ReleaseNotes/730.html Demonstrates the old way of aliasing a namespace in Fusion, which will not work starting with Neos version 8. ```fusion namespace: Foo = Acme.Demo video = Foo:YouTube ``` -------------------------------- ### Minimal DimensionsMenu Example Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html This is the most basic usage of the DimensionsMenu, outputting a menu with all configured dimension combinations. ```fusion variantMenu = Neos.Neos:DimensionsMenu ``` -------------------------------- ### Neos Fusion Fragment Example Source: https://neos.readthedocs.io/en/8.3/_sources/References/NeosFusionReference.rst.txt Renders content without additional markup, useful for conditional rendering of larger AFX blocks. The 'content' property defines what gets rendered. ```fusion renderer = afx`

Example

Content

` ``` -------------------------------- ### Example File Path Source: https://neos.readthedocs.io/en/8.3/References/CodingGuideLines/PHP.html Illustrates the expected file naming convention and directory structure for PHP files within a package. ```plaintext Neos.TemplateEngine/Classes/TemplateEngineInterface.php ``` ```plaintext Neos.Flow/Classes/Error/RuntimeException.php ``` ```plaintext Acme.DataAccess/Classes/CustomQuery.php ``` ```plaintext Neos.Flow/Tests/Unit/Package/PackageManagerTest.php ``` -------------------------------- ### Define Edit Node Privilege Source: https://neos.readthedocs.io/en/8.3/Appendixes/ReleaseNotes/200.html Example of defining a privilege to restrict editing access to a specific part of the node tree. This is useful for multi-site setups or when segmenting content editing responsibilities. ```yaml 'TYPO3\TYPO3CR\Security\Authorization\Privilege\Node\EditNodePrivilege': 'YourSite:EditWebsitePart': matcher: "isDescendantNodeOf(\"/sites/yourwebsite/custom\")" ``` -------------------------------- ### TableView Data Source Implementation Source: https://neos.readthedocs.io/en/8.3/_sources/References/InspectorViewsReference/index.rst.txt Placeholder for a PHP class that implements DataSourceInterface to provide data for the TableView. This example is a starting point and would need to be filled with specific data retrieval logic. ```php Some Link ` ``` -------------------------------- ### Install requirejs globally Source: https://neos.readthedocs.io/en/8.3/Contribute/Code/EmberUI.html Installs RequireJS globally, a module and dependency loader for JavaScript. ```bash sudo npm install -g requirejs ``` -------------------------------- ### Install Pip Package Manager Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/BeginnersGuide.html Installs the python-pip package manager on Arch Linux systems. ```shell sudo pacman -S python-pip ``` -------------------------------- ### Initialize Asset Source via createFromConfiguration Source: https://neos.readthedocs.io/en/8.3/Appendixes/ChangeLogs/8013.html Example of initializing a value object in the createFromConfiguration static factory method. ```php final class MyAssetSource implements AssetSourceInterface { /* … */ public static function createFromConfiguration(string $assetSourceIdentifier, array $assetSourceOptions): AssetSourceInterface { return new static( $assetSourceIdentifier, Options::fromArray($assetSourceOptions) ); } } ``` -------------------------------- ### Neos.Fusion:Link.Action Example (AFX) Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Renders a link to a controller and action using AFX syntax. Includes content, CSS class, and href attributes for package, controller, and action. ```afx link = afx` register ` ``` -------------------------------- ### Show All Configuration Settings Source: https://neos.readthedocs.io/en/8.3/References/CommandReference.html Displays all active configuration settings for the current context. You can specify the configuration type and path to show specific parts of the configuration. ```bash ./flow configuration:show ``` -------------------------------- ### PHP Asset Source Initialization Example Source: https://neos.readthedocs.io/en/8.3/_sources/Appendixes/ChangeLogs/7316.rst.txt Demonstrates how to define an asset source with a value object for options and initialize it using a static factory method. This addresses issues where the asset source service might directly call the constructor instead of the factory. ```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) ); } } ``` -------------------------------- ### PHP: Initialize Asset Source with Value Object Source: https://neos.readthedocs.io/en/8.3/Appendixes/ChangeLogs/7316.html Demonstrates initializing an asset source using a value object in its constructor and the `createFromConfiguration` factory method. ```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) ); } } ``` -------------------------------- ### Basic Form Usage (GET) Source: https://neos.readthedocs.io/en/8.3/References/ViewHelpers/FluidAdaptor.html Outputs an HTML form tag with a specified action and explicitly sets the method to GET. ```html ... ``` ```html
...
``` -------------------------------- ### Build documentation with Docker Source: https://neos.readthedocs.io/en/8.3/Contribute/Documentation/Documentation.html Use a Docker image to build documentation if local Sphinx installation is problematic. This command mounts the current directory into the container for file access and output. ```bash docker run -v $(pwd):/documents hhoechtl/doctools-sphinx make html ``` -------------------------------- ### Check if String Starts With Substring Source: https://neos.readthedocs.io/en/8.3/References/EelHelpersReference.html Tests whether 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 String.startsWith('My hovercraft is full of...', 'Hello') == false String.startsWith('My hovercraft is full of...', 'hovercraft', 3) == true ``` -------------------------------- ### Create a User with Administrative Privileges Source: https://neos.readthedocs.io/en/8.3/Operations/CommandLine.html Creates a new user with the specified email, password, name, and administrative role. This is a common task for setting up initial administrators. ```bash ./flow user:create john@doe.com pazzw0rd John Doe --roles Neos.Neos:Administrator ``` -------------------------------- ### Run QUnit tests for JavaScript modules Source: https://neos.readthedocs.io/en/8.3/Contribute/Code/EmberUI.html Executes QUnit tests for JavaScript modules. PhantomJS is used and automatically installed via `npm install`. ```bash grunt test ``` -------------------------------- ### Example TimeSeriesView Configuration Source: https://neos.readthedocs.io/en/8.3/_sources/References/InspectorViewsReference/index.rst.txt This YAML configuration demonstrates how to set up a TimeSeriesView in the Neos Inspector. It specifies data source, collection, series mapping, and chart options. ```yaml 'Vendor.Site:MyCustomNodeType': # ... ui: inspector: views: timeSeriesViewExample: label: 'TimeSeriesView Example' group: examples view: 'Neos.Neos/Inspector/Views/Data/TimeSeriesView' viewOptions: subtitle: 'last month' dataSource: vendor-site-time-series-view collection: rows series: timeData: date valueData: uniqueVisitors chart: selectedInterval: weeks yAxisFromZero: false # ... ``` -------------------------------- ### Fusion: Use get() instead of has() for cache operations Source: https://neos.readthedocs.io/en/8.3/_sources/Appendixes/ChangeLogs/8017.rst.txt Replaces the unreliable cache 'has' operation with 'get' and checks against false to prevent errors during cache operations. ```fusion get(cacheIdentifier, cacheKey) ``` -------------------------------- ### Fusion Runtime @process with String Example Source: https://neos.readthedocs.io/en/8.3/_sources/Appendixes/ChangeLogs/820.rst.txt This example demonstrates how to use the @process directive in Fusion with a simple string value. Previously, this was not supported and would cause issues. ```fusion @process ``` -------------------------------- ### Configure Additional Resources for All Backend Modules Source: https://neos.readthedocs.io/en/8.3/Appendixes/ChangeLogs/830.html Shows how to include stylesheets and JavaScript files for all Neos backend modules simultaneously. This avoids the need to add resources to each module individually. ```yaml Neos: moduleConfiguration: additionalResources: styleSheets: > ‘My.Package’: ‘resource://My.Package/Public/JavaScript/Main.css’ javaScripts: > ‘My.Package’: ‘resource://My.Package/Public/JavaScript/Main.js’ ``` -------------------------------- ### Configure MenuItems with Custom Starting Point Source: https://neos.readthedocs.io/en/8.3/_sources/References/NeosFusionReference.rst.txt Defines a specific node as the starting point for a MenuItems list and limits the menu depth. Useful for creating sub-menus or specific sections. ```fusion menuItems = Neos.Neos:MenuItems { entryLevel = 2 maximumLevels = 1 startingPoint = ${q(site).children('[uriPathSegment="metamenu"]').get(0)} } ``` -------------------------------- ### Link to Content Module with Neos.Fusion:ActionUri Source: https://neos.readthedocs.io/en/8.3/Appendixes/ReleaseNotes/810.html This example demonstrates linking to the content module from a subrequest using Neos.Fusion:ActionUri. It specifies the main request and relevant arguments. ```fusion cotentModuleUri = Neos.Fusion:ActionUri { request = ${request.mainRequest} package =”Neos.Neos.Ui” controller =”Backend” action = ‘index’ arguments.node = ${documentNode} ``` -------------------------------- ### Menu with Custom Starting Point Source: https://neos.readthedocs.io/en/8.3/_sources/References/NeosFusionReference.rst.txt Configure a Neos.Neos:Menu to start rendering from a specific node, defined by its URI path segment. This allows for creating sub-menus or specific navigation sections. ```fusion menu = Neos.Neos:Menu { entryLevel = 2 maximumLevels = 1 startingPoint = ${q(site).children('[uriPathSegment="metamenu"]').get(0)} } ``` -------------------------------- ### Fusion: Use get() instead of has() for cache reliability Source: https://neos.readthedocs.io/en/8.3/_sources/Appendixes/ChangeLogs/8112.rst.txt Replaces the `has()` operation with `get()` for Fusion parser cache to improve reliability when the cache might be broken. This is a bugfix for issues where `has()` did not work reliably. ```php // Use get() instead of has() for cache reliability if ($this->cache->get($cacheEntryIdentifier) === false) { return false; } ``` -------------------------------- ### Neos.Fusion:Link.Action Example (Fusion) Source: https://neos.readthedocs.io/en/8.3/References/NeosFusionReference.html Renders a link to a controller and action using Fusion syntax. Specifies content, CSS class, and href details including package, controller, and action. ```fusion link = Neos.Fusion:Link.Action { content = "register" class="action-link" href.package = 'My.Package' href.controller = 'Registration' href.action = 'new' } ``` -------------------------------- ### Get cache lifetime of nodes Source: https://neos.readthedocs.io/en/8.3/References/FlowQueryOperationReference.html Gets the minimum of all allowed cache lifetimes for the nodes in the current FlowQuery context. To include already hidden nodes, invisible nodes must also be included in the context. ```javascript q(node).context({'invisibleContentShown': true}).children().cacheLifetime() ``` -------------------------------- ### Flow Standard File Header Source: https://neos.readthedocs.io/en/8.3/References/CodingGuideLines/PHP.html Every PHP file must start with a namespace declaration and a copyright header. Ensure the header includes the correct package and license information. Do not use '/**' to start the copyright header. ```PHP # lists commands provided in package ./flow help # show help for specific command ``` -------------------------------- ### Example Nodetype for Asset Subtypes Source: https://neos.readthedocs.io/en/8.3/Appendixes/ChangeLogs/8313.html This example nodetype demonstrates how to configure properties for different asset subtypes (Video, Document, Audio) using the AssetEditor in the Neos backend. It shows how to define types, labels, and inspector groups. ```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 ``` -------------------------------- ### Array.length Source: https://neos.readthedocs.io/en/8.3/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) ``` -------------------------------- ### Include Resources for All Backend Modules Source: https://neos.readthedocs.io/en/8.3/Appendixes/ReleaseNotes/830.html Configuration to add stylesheets and JavaScript to all backend modules simultaneously. This avoids the need to add resources to each module individually. ```yaml Neos: moduleConfiguration: additionalResources: styleSheets: ‘My.Package’: ‘resource://My.Package/Public/JavaScript/Main.css’ javaScripts: ‘My.Package’: ‘resource://My.Package/Public/JavaScript/Main.js’ ``` -------------------------------- ### Accessing Assets in Fusion Source: https://neos.readthedocs.io/en/8.3/Appendixes/ChangeLogs/830.html Provides examples of how to access Neos.Media assets using Fusion helpers. Ensure assets are tagged or in collections for effective searching. ```fusion assetsByTag = ${Neos.Media.Assets.findByTag('MyTag')} assetsByCollection = ${Neos.Media.Assets.findByCollection('MyCollection')} assetsBySearchTerm = ${Neos.Media.Assets.findBySearchTerm('alice')} ``` -------------------------------- ### Commit Message Format Example Source: https://neos.readthedocs.io/en/8.3/_sources/References/CodingGuideLines/PHP.rst.txt Demonstrates the standard format for commit messages, including type, summary, detailed explanation, and issue tracking. ```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. Code snippets:: should be written in ReStructuredText compatible format for better highlighting 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 Fixes #123 ``` -------------------------------- ### last Source: https://neos.readthedocs.io/en/8.3/_sources/References/FlowQueryOperationReference.rst.txt Get the last element inside the context. ```APIDOC ## last ### Description Get the last element inside the context. ### Implementation Neos\Eel\FlowQuery\Operations\LastOperation ``` -------------------------------- ### Get Array Keys Source: https://neos.readthedocs.io/en/8.3/References/EelHelpersReference.html Retrieves all the keys from an array. ```Eel Array.keys(array) ```