ExportAction extends Action
Harvester of the lang files disposition.
Table of Contents
Methods
- __construct() : mixed
- \Bitrix\Main\Engine\Action constructor.
- className() : string
- Returns the fully qualified name of this class.
- configure() : void
- Configures action by additional params.
- convertKeysToCamelCase() : array<string|int, mixed>|mixed|string
- Converts keys of array to camel case notation.
- findSamples() : array<string|int, mixed>
- Looks for exact translation sample of the phrase.
- getArguments() : array<string|int, mixed>
- Returns list of action arguments.
- getBinder() : Binder
- getConfig() : array<string|int, mixed>
- getController() : Controller
- getCurrentUser() : mixed
- getDownloadingParameters() : array<string|int, mixed>
- Returns exported file properties.
- getDownloadingSamplesParameters() : array<string|int, mixed>
- Returns exported file properties.
- getErrorByCode() : Error
- Getting once error with the necessary code.
- getErrors() : array<string|int, Error>
- Getting array of errors.
- getName() : string
- hasErrors() : bool
- Checks if error occurred.
- lookThroughLangFolder() : Generator|array<string|int, mixed>|iterable<string|int, mixed>
- Runs through lang folder and collects full path to lang files.
- mergeLangFiles() : array<string|int, mixed>
- Merges all language files into one array.
- run() : array<string|int, mixed>
- runWithSourceParametersList() : mixed
- setArguments() : Binder
- Sets list of action arguments.
Methods
__construct()
\Bitrix\Main\Engine\Action constructor.
public
__construct(string $name, Controller $controller[, array<string|int, mixed> $config = [] ]) : mixed
Parameters
- $name : string
-
Action name.
- $controller : Controller
-
Parent controller object.
- $config : array<string|int, mixed> = []
-
Additional configuration.
className()
Returns the fully qualified name of this class.
public
final static className() : string
Return values
stringconfigure()
Configures action by additional params.
public
configure(mixed $params) : void
The method will be invoked by controller and $params have to set in 'configureActions'
Parameters
- $params : mixed
convertKeysToCamelCase()
Converts keys of array to camel case notation.
public
convertKeysToCamelCase(mixed $data) : array<string|int, mixed>|mixed|string
Parameters
- $data : mixed
-
Data.
Tags
Return values
array<string|int, mixed>|mixed|stringfindSamples()
Looks for exact translation sample of the phrase.
public
findSamples(string $searchPhrase, string $searchLangId, int|string $stripPath[, int $limit = 50 ][, array<string|int, int> $restrictByPathId = [] ]) : array<string|int, mixed>
Parameters
- $searchPhrase : string
-
Phrase to look for.
- $searchLangId : string
-
Phrase lang to look for.
- $stripPath : int|string
-
Strip current file.
- $limit : int = 50
-
Limit search result.
- $restrictByPathId : array<string|int, int> = []
Return values
array<string|int, mixed>getArguments()
Returns list of action arguments.
public
final getArguments() : array<string|int, mixed>
It is associative array looks like argument name => value.
Tags
Return values
array<string|int, mixed>getBinder()
public
final getBinder() : Binder
Return values
BindergetConfig()
public
final getConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>getController()
public
final getController() : Controller
Return values
ControllergetCurrentUser()
public
final getCurrentUser() : mixed
getDownloadingParameters()
Returns exported file properties.
public
getDownloadingParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>getDownloadingSamplesParameters()
Returns exported file properties.
public
getDownloadingSamplesParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>getErrorByCode()
Getting once error with the necessary code.
public
final getErrorByCode(string $code) : Error
Parameters
- $code : string
-
Code of error.
Return values
ErrorgetErrors()
Getting array of errors.
public
final getErrors() : array<string|int, Error>
Return values
array<string|int, Error>getName()
public
final getName() : string
Return values
stringhasErrors()
Checks if error occurred.
public
hasErrors() : bool
Return values
boollookThroughLangFolder()
Runs through lang folder and collects full path to lang files.
public
lookThroughLangFolder(string $langPath) : Generator|array<string|int, mixed>|iterable<string|int, mixed>
Parameters
- $langPath : string
-
Relative project path of the language folder.
Return values
Generator|array<string|int, mixed>|iterable<string|int, mixed>mergeLangFiles()
Merges all language files into one array.
public
mergeLangFiles(string $langFilePath, array<string|int, string> $fullLangFilePaths[, bool $collectUntranslated = false ][, array<string|int, string> $filterByCodeList = [] ]) : array<string|int, mixed>
Parameters
- $langFilePath : string
-
Relative project path of the language file.
- $fullLangFilePaths : array<string|int, string>
-
Array of full paths to lang files.
- $collectUntranslated : bool = false
-
Collect only untranslated phrases.
- $filterByCodeList : array<string|int, string> = []
-
Array of prase codes to filter.
Return values
array<string|int, mixed>run()
public
run(string $path, bool $runBefore) : array<string|int, mixed>
Parameters
- $path : string
- $runBefore : bool
Return values
array<string|int, mixed>runWithSourceParametersList()
public
runWithSourceParametersList() : mixed
setArguments()
Sets list of action arguments.
public
final setArguments(array<string|int, mixed> $arguments) : Binder
It is associative array looks like argument name => value. Be aware the method reset old values and set new arguments.
Parameters
- $arguments : array<string|int, mixed>
-
List of action arguments.