lochmueller/autoloader

Automatic components loading of ExtBase extensions to get more time for coffee in the company ;) This ext is not a PHP SPL autoloader or class loader - it is better! Loads CommandController, Xclass, Hooks, FlexForms, Slots, TypoScript, TypeConverter, BackendLayouts and take care of createing needed

Fund package maintenance!
lochmueller
paypal.me/lochmueller

Installs: 318 489

Dependents: 6

Suggesters: 0

Security: 0

Stars: 20

Watchers: 6

Forks: 30

Open Issues: 0

Type:typo3-cms-extension

7.4.6 2023-05-11 07:59 UTC

README

Latest Stable Version Total Downloads License TYPO3 TYPO3 Average time to resolve an issue Percentage of issues still open

Autoloader: Swiss Knife for Developers

Autoloader speeds up your development cycle - more time for coffee!

Autoloader Annotations

/**

* @DatabaseTable(tableName="")
* @DatabaseKey([key=""|argumentName=""])
* @DatabaseField(type=""[, sql=""])
*
* @EnableRichText([value=""|argumentName=""])
* @Hook(locations={})
* @NoCache([value=""|argumentName=""])
* @NoHeader([value=""|argumentName=""])
* @ParentClass(parentClass="")
* @Plugin([value=""|argumentName=""])
* @RecordType(recordType="")

* @SignalClass([value=""|argumentName=""])
* @SignalName([value=""|argumentName=""])
* @SignalPriority([value=""|argumentName=""])

* @SmartExclude(excludes="{}")
* @WizardTab(config="")
*
*/

Working Examples

We drop the examples in EXT:autoloader. Please check other extensions tht use autoloader as example (EXT:calendarize)

Example for a SmartObject (Only one of the features)

ext_tables.php

\HDNET\Autoloader\Loader::extTables(
    'vendorName',
    'extensionKey',
    [
    	'SmartObjects',
    	'TcaFiles'
    ]
);

ext_localconf.php

\HDNET\Autoloader\Loader::extLocalconf(
	'vendorName',
	'extensionKey'
	[
		'SmartObjects',
		'TcaFiles'
	]
);

Test.php

namespace vendorName\extensionKey\Domain\Model;

use HDNET\Autoloader\Annotation\DatabaseField;
use HDNET\Autoloader\Annotation\DatabaseTable;

use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
 * Create a test-table for this model with this annotation.
 * @DatabaseTable(tableName="test")
 */
class Test extends AbstractEntity {

	/**
	 * A basic field
	 *
	 * @var string
	 * @DatabaseField(type="string")
	 */
	protected $textField;

	/**
	 * A boolean field
	 *
	 * @var bool
	 * @DatabaseField(type="bool")
	 */
	protected $boolField;

	/**
	 * File example
	 *
	 * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
	 * @DatabaseField(type="string")
	 */
	protected $file;

	/**
	 * Custom (variable that has a custom DB type)
	 *
	 * @var int
	 * @DatabaseField(type="int", sql="int(11) DEFAULT '0' NOT NULL")
	 */
	protected $customField;

	// add here some Getters and Setters
}

Documentation