fgtclb / file-required-attributes
Marks metadata fields required and disables file references if required fields are missing
Installs: 1 040
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 4
Type:typo3-cms-extension
Requires
- typo3/cms-core: ^11.5
This package is auto-updated.
Last update: 2024-11-10 12:29:05 UTC
README
What does it do?
This extension offers the ability to set metadata information as required. With required attributes, it provides the possibility to disable references having missing attributes.
If metadata is set in file reference, too, the file reference is updated.
If attribute only appears in metadata, a virtual field is added to reference, enforcing the ability to update metadata from reference. A warning, this change is made globally, is added to the field description.
Installation
composer req fgtclb/file-required-attributes
How to use
Add required field registration in TCA/Overrides/sys_file_metadata.php
inside
your extension:
<?php declare(strict_types=1); (static function (): void { \FGTCLB\FileRequiredAttributes\Utility\RequiredColumnsUtility::register( 'copyright', [ \TYPO3\CMS\Core\Resource\AbstractFile::FILETYPE_IMAGE, // ... ] ); \FGTCLB\FileRequiredAttributes\Utility\RequiredColumnsUtility::register( 'alternative', [ \TYPO3\CMS\Core\Resource\AbstractFile::FILETYPE_IMAGE, // ... ] ); \FGTCLB\FileRequiredAttributes\Utility\RequiredColumnsUtility::register( 'title', [ \TYPO3\CMS\Core\Resource\AbstractFile::FILETYPE_IMAGE, ] ); \FGTCLB\FileRequiredAttributes\Utility\RequiredColumnsUtility::register( 'description', [ \TYPO3\CMS\Core\Resource\AbstractFile::FILETYPE_IMAGE, ] ); })();
This extension will handle all required steps by itself, you don't need to handle with TCA.