‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Page\JavaScriptModuleInstruction Class Reference
Inheritance diagram for TYPO3\CMS\Core\Page\JavaScriptModuleInstruction:

Public Member Functions

 __construct (string $name, int $flags)
 
 getState ()
 
 jsonSerialize ()
 
 getName ()
 
 getExportName ()
 
 getFlags ()
 
 getItems ()
 
$this addFlags (int ... $flags)
 
 shallLoadImportMap ()
 
 shallUseTopWindow ()
 

Static Public Member Functions

static create (string $name, ?string $exportName=null)
 
static self fromState (array $state)
 
static assign (array $assignments)
 
static invoke (?string $method=null,... $args)
 
static instance (... $args)
 

Public Attributes

const FLAG_LOAD_IMPORTMAP = 2
 
const FLAG_USE_TOP_WINDOW = 16
 
const ITEM_ASSIGN = 'assign'
 
const ITEM_INVOKE = 'invoke'
 
const ITEM_INSTANCE = 'instance'
 

Protected Attributes

string $name
 
string $exportName
 
int $flags
 
array $items = []
 

Detailed Description

Definition at line 22 of file JavaScriptModuleInstruction.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::__construct ( string  $name,
int  $flags 
)

Member Function Documentation

◆ addFlags()

$this TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::addFlags ( int ...  $flags)
Returns
‪$this

Definition at line 116 of file JavaScriptModuleInstruction.php.

References TYPO3\CMS\Core\Page\JavaScriptModuleInstruction\$flags.

◆ assign()

static TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::assign ( array  $assignments)
static
Parameters
array$assignments‪key-value assignments
Returns
‪static

Definition at line 128 of file JavaScriptModuleInstruction.php.

◆ create()

static TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::create ( string  $name,
?string  $exportName = null 
)
static
Parameters
string$name‪Module name mapped by an importmap or absolute specifier
string | null$exportName‪(optional) name used internally to export the module

Definition at line 47 of file JavaScriptModuleInstruction.php.

References TYPO3\CMS\Core\Page\JavaScriptModuleInstruction\$exportName, and TYPO3\CMS\Core\Page\JavaScriptModuleInstruction\$name.

Referenced by TYPO3\CMS\Backend\EventListener\AfterBackendPageRenderEventListener\__invoke(), TYPO3\CMS\Backend\Controller\PageLayoutController\addJavaScriptModuleInstructions(), TYPO3\CMS\Redirects\Hooks\DispatchNotificationHook\dispatchNotification(), TYPO3\CMS\Backend\Template\ModuleTemplate\dispatchNotificationMessages(), TYPO3\CMS\Backend\Tests\Unit\CodeEditor\Registry\ModeRegistryTest\formatCodeReturnsCorrectMode(), TYPO3\CMS\Extensionmanager\Controller\ExtensionComposerStatusController\getComposerManifestMarkup(), TYPO3\CMS\Backend\Form\Container\FilesControlContainer\getFileSelectors(), TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget\getJavaScriptModuleInstructions(), TYPO3\CMS\Dashboard\Widgets\BarChartWidget\getJavaScriptModuleInstructions(), TYPO3\CMS\Filelist\Controller\FileListController\handleRequest(), TYPO3\CMS\Form\Controller\FormManagerController\indexAction(), TYPO3\CMS\Form\Controller\FormEditorController\indexAction(), TYPO3\CMS\Backend\Controller\LinkBrowserController\initDocumentTemplate(), TYPO3\CMS\Backend\Controller\PageLayoutController\initializeClipboard(), TYPO3\CMS\Backend\Form\FormResultCompiler\JSbottom(), TYPO3\CMS\Backend\Tests\Unit\CodeEditor\Registry\ModeRegistryTest\latestDefaultModeIsReturned(), TYPO3\CMS\Core\Page\PageRenderer\loadJavaScriptModule(), TYPO3\CMS\Backend\Controller\Page\MovePageController\mainAction(), TYPO3\CMS\Backend\Controller\BackendController\mainAction(), TYPO3\CMS\Backend\Tests\Unit\CodeEditor\Registry\ModeRegistryTest\modeIsFetchedByFileExtension(), TYPO3\CMS\Backend\Form\FieldWizard\LocalizationStateSelector\render(), TYPO3\CMS\Backend\Form\FieldControl\ResetSelection\render(), TYPO3\CMS\Backend\Form\FieldControl\PasswordGenerator\render(), TYPO3\CMS\Backend\Form\Container\TabsContainer\render(), TYPO3\CMS\Backend\Form\FieldControl\InsertClipboard\render(), TYPO3\CMS\Backend\Form\FieldControl\ListModule\render(), TYPO3\CMS\Backend\Form\FieldControl\AddRecord\render(), TYPO3\CMS\Backend\Form\Container\FlexFormSectionContainer\render(), TYPO3\CMS\Backend\Form\Container\FlexFormTabsContainer\render(), TYPO3\CMS\Backend\Form\FieldControl\EditPopup\render(), TYPO3\CMS\Backend\Form\FieldControl\LinkPopup\render(), TYPO3\CMS\Backend\Form\Element\MfaInfoElement\render(), TYPO3\CMS\Backend\Form\Element\UuidElement\render(), TYPO3\CMS\Backend\Form\Element\PasswordElement\render(), TYPO3\CMS\Backend\Form\Element\CategoryElement\render(), TYPO3\CMS\Backend\Form\Element\TablePermissionElement\render(), TYPO3\CMS\Backend\Form\Container\SiteLanguageContainer\render(), TYPO3\CMS\Backend\Form\Element\BackendLayoutWizardElement\render(), TYPO3\CMS\Backend\Form\Element\ColorElement\render(), TYPO3\CMS\Backend\Form\Element\EmailElement\render(), TYPO3\CMS\Backend\Form\Element\JsonElement\render(), TYPO3\CMS\Backend\Form\Element\InputTextElement\render(), TYPO3\CMS\Backend\Form\Element\NumberElement\render(), TYPO3\CMS\Backend\Form\Element\DatetimeElement\render(), TYPO3\CMS\Backend\Form\Element\SelectTreeElement\render(), TYPO3\CMS\Backend\Form\Element\SelectCheckBoxElement\render(), TYPO3\CMS\Backend\Form\Element\SelectSingleElement\render(), TYPO3\CMS\Backend\Form\Element\TextElement\render(), TYPO3\CMS\Backend\Form\Element\InputSlugElement\render(), TYPO3\CMS\Backend\Form\Element\CodeEditorElement\render(), TYPO3\CMS\Backend\Form\Element\TextTableElement\render(), TYPO3\CMS\Backend\Form\Container\InlineControlContainer\render(), TYPO3\CMS\Backend\Form\Element\FolderElement\render(), TYPO3\CMS\Backend\Form\Container\FilesControlContainer\render(), TYPO3\CMS\RteCKEditor\Form\Element\RichTextElement\render(), TYPO3\CMS\Backend\Form\Element\LinkElement\render(), TYPO3\CMS\Backend\Form\Element\GroupElement\render(), TYPO3\CMS\Backend\Form\Element\SelectMultipleSideBySideElement\render(), TYPO3\CMS\Backend\Form\Element\ImageManipulationElement\render(), TYPO3\CMS\Backend\Tests\Unit\Form\Element\JsonElementTest\renderReturnsJsonInCodeEditor(), TYPO3\CMS\Backend\Form\Element\AbstractFormElement\resolveJavaScriptEvaluation(), TYPO3\CMS\Redirects\Evaluation\SourceHost\returnFieldJS(), and TYPO3\CMS\Core\Tests\Functional\Page\JavaScriptRendererTest\textContentIsEncoded().

◆ fromState()

static self TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::fromState ( array  $state)
static
Returns
‪self

Definition at line 58 of file JavaScriptModuleInstruction.php.

◆ getExportName()

TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::getExportName ( )

◆ getFlags()

TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::getFlags ( )

◆ getItems()

TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::getItems ( )

◆ getName()

TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::getName ( )

◆ getState()

◆ instance()

static TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::instance (   $args)
static
Parameters
mixed‪...$args new instance arguments
Returns
‪static

Definition at line 156 of file JavaScriptModuleInstruction.php.

References $args.

◆ invoke()

static TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::invoke ( ?string  $method = null,
  $args 
)
static
Parameters
string | null$method‪method of JavaScript module to be invoked
mixed‪...$args corresponding method arguments
Returns
‪static

Definition at line 142 of file JavaScriptModuleInstruction.php.

References $args.

◆ jsonSerialize()

TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::jsonSerialize ( )

◆ shallLoadImportMap()

TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::shallLoadImportMap ( )

◆ shallUseTopWindow()

TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::shallUseTopWindow ( )

Member Data Documentation

◆ $exportName

◆ $flags

◆ $items

array TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::$items = []
protected

◆ $name

◆ FLAG_LOAD_IMPORTMAP

const TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::FLAG_LOAD_IMPORTMAP = 2

Indicates an ES6/11 module shall be loaded (paths mapped by an importmap)

Definition at line 27 of file JavaScriptModuleInstruction.php.

Referenced by TYPO3\CMS\Core\Page\JavaScriptModuleInstruction\shallLoadImportMap().

◆ FLAG_USE_TOP_WINDOW

const TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::FLAG_USE_TOP_WINDOW = 16

Indicates all actions shall be applied globally to top.window.

Definition at line 32 of file JavaScriptModuleInstruction.php.

Referenced by TYPO3\CMS\Redirects\Hooks\DispatchNotificationHook\dispatchNotification(), and TYPO3\CMS\Core\Page\JavaScriptModuleInstruction\shallUseTopWindow().

◆ ITEM_ASSIGN

const TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::ITEM_ASSIGN = 'assign'

Definition at line 34 of file JavaScriptModuleInstruction.php.

◆ ITEM_INSTANCE

const TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::ITEM_INSTANCE = 'instance'

Definition at line 36 of file JavaScriptModuleInstruction.php.

◆ ITEM_INVOKE

const TYPO3\CMS\Core\Page\JavaScriptModuleInstruction::ITEM_INVOKE = 'invoke'

Definition at line 35 of file JavaScriptModuleInstruction.php.