|
7 | 7 | Extensions |
8 | 8 | ========== |
9 | 9 |
|
10 | | -.. figure:: /Images/Illustrations/extensions.png |
11 | | - |
12 | 10 | Extensions are pieces of software developed by the TYPO3 community that extend |
13 | | -the functionality of a TYPO3 installation. Extensions come in many forms |
14 | | -- from small extensions that carry out specific tasks to larger extensions that |
15 | | -provide an entire suite of functionality, e.g. the TYPO3 Blog Extension. |
| 11 | +the functionality of a TYPO3 installation. Extensions come in many forms. |
| 12 | +Some are only used for one site and contain mainly the theme of that site. |
| 13 | +These extensions are called a :ref:`site package <creating-a-site-package>`. |
| 14 | + |
| 15 | +.. contents:: |
| 16 | + |
| 17 | +.. _concepts-extensions-composer: |
| 18 | + |
| 19 | +Extensions as Composer packages |
| 20 | +================================ |
| 21 | + |
| 22 | +If you have worked with other PHP based projects you have probably run across |
| 23 | +`Composer packages <https://dev.to/joemoses33/create-a-composer-package-how-to-29kn>`__. |
| 24 | + |
| 25 | +Each TYPO3 extension is a Composer package of type `typo3-cms-extension`. |
| 26 | +Extensions provided by the TYPO3 Core have type `typo3-cms-framework`. |
| 27 | + |
| 28 | +The minimum needed to define a TYPO3 extension is: |
| 29 | + |
| 30 | +A directory containing a file called :file:`composer.json` with at least |
| 31 | +the following data: |
| 32 | + |
| 33 | +.. code-block:: yaml |
| 34 | + :caption: packages/my_extension/composer.json |
| 35 | +
|
| 36 | + { |
| 37 | + "name": "myvendor/my-extension", |
| 38 | + "type": "typo3-cms-extension", |
| 39 | + "require": { |
| 40 | + "typo3/cms-core": "^13.4", |
| 41 | + }, |
| 42 | + "extra": { |
| 43 | + "typo3/cms": { |
| 44 | + "extension-key": "my_extension" |
| 45 | + } |
| 46 | + } |
| 47 | + } |
| 48 | +
|
| 49 | +In order to be used the Extension should be |
| 50 | +:ref:`installed via Composer <installing-extensions>`. |
| 51 | + |
| 52 | +There is a legacy way to |
| 53 | +:ref:`install extensions without Composer <t3coreapi:extensions-legacy-management>` but it |
| 54 | +is not recommended anymore and not covered in this Guide. For this legacy way of |
| 55 | +installation as well as for functional tests or to publish your extension your |
| 56 | +need a file called :ref:`ext_emconf.php <t3coreapi:ext_emconf-php>`. This topic |
| 57 | +is also not covered here. |
| 58 | + |
| 59 | +.. _concepts-extensions-plugin: |
| 60 | + |
| 61 | +Extension vs plugin |
| 62 | +=================== |
| 63 | + |
| 64 | +A TYPO3 extension is a similar concept to what is called a "Plugin" in WordPress. |
| 65 | + |
| 66 | +In TYPO3 a **plugin** is a **content element** that can be inserted into one or |
| 67 | +all pages, typically providing dynamic or interactive functionality. |
| 68 | + |
| 69 | +The data to be displayed is usually supplied by a special PHP class called a |
| 70 | +"controller". |
| 71 | + |
| 72 | +One **TYPO3 extension** can provide several plugins - or none at all. |
| 73 | + |
| 74 | +See also: :ref:`Plugins in TYPO3 (TYPO3 explained) <t3coreapi:plugins>`. |
| 75 | + |
| 76 | +Therefore in TYPO3 extensions and plugins are different concepts. |
| 77 | + |
| 78 | +.. _concepts-extensions-types: |
| 79 | + |
| 80 | +Types of extensions |
| 81 | +=================== |
| 82 | + |
| 83 | +Internally the TYPO3 Core consists of mandatory and optional **system extensions** |
| 84 | +each of them is a Composer package. All mandatory system extensions and a few |
| 85 | +recommended ones will be automatically installed during the |
| 86 | +:ref:`Installation <t3start:installation-ddev-tutorial>`. Optional system |
| 87 | +extensions can be installed via Composer or the Extension Manager in classic mode |
| 88 | + |
| 89 | +**Third party extensions** offer additional functionality. Find commonly used |
| 90 | +extensions in the list of |
| 91 | +:ref:`Recommended Extensions <t3start:recommended-extensions>`. There are |
| 92 | +extensions available for many different use cases, see also chapter |
| 93 | +:ref:`How to find extensions <t3start:how-to-find-extensions>`. |
| 94 | + |
| 95 | +A **site package** is an extension that you install locally and only in your |
| 96 | +project. It contains the templates and assets as well as configuration for your |
| 97 | +theme. It can also contain specialized plugins or other pieces of software used |
| 98 | +only in this one project. |
0 commit comments