repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
TYPO3-extensions/gridelements
Classes/Xclass/DatabaseRecordList.php
DatabaseRecordList.addActionToCellGroup
public function addActionToCellGroup(&$cells, $action, $actionKey) { $cellsMap = [ 'primary' => [ 'view', 'edit', 'hide', 'delete', 'stat', ], 'secondary' => [ 'viewBig', ...
php
public function addActionToCellGroup(&$cells, $action, $actionKey) { $cellsMap = [ 'primary' => [ 'view', 'edit', 'hide', 'delete', 'stat', ], 'secondary' => [ 'viewBig', ...
[ "public", "function", "addActionToCellGroup", "(", "&", "$", "cells", ",", "$", "action", ",", "$", "actionKey", ")", "{", "$", "cellsMap", "=", "[", "'primary'", "=>", "[", "'view'", ",", "'edit'", ",", "'hide'", ",", "'delete'", ",", "'stat'", ",", "...
add action into correct section @param array $cells @param string $action @param string $actionKey
[ "add", "action", "into", "correct", "section" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Xclass/DatabaseRecordList.php#L2080-L2106
TYPO3-extensions/gridelements
Classes/Xclass/DatabaseRecordList.php
DatabaseRecordList.showNewRecLink
public function showNewRecLink($table) { // No deny/allow tables are set: if (empty($this->allowedNewTables) && empty($this->deniedNewTables)) { return true; } return !in_array($table, $this->deniedNewTables) && (empty($this->allowedNewTables) || in_array($tab...
php
public function showNewRecLink($table) { // No deny/allow tables are set: if (empty($this->allowedNewTables) && empty($this->deniedNewTables)) { return true; } return !in_array($table, $this->deniedNewTables) && (empty($this->allowedNewTables) || in_array($tab...
[ "public", "function", "showNewRecLink", "(", "$", "table", ")", "{", "// No deny/allow tables are set:", "if", "(", "empty", "(", "$", "this", "->", "allowedNewTables", ")", "&&", "empty", "(", "$", "this", "->", "deniedNewTables", ")", ")", "{", "return", "...
Returns TRUE if a link for creating new records should be displayed for $table @param string $table Table name @return bool Returns TRUE if a link for creating new records should be displayed for $table @see \TYPO3\CMS\Backend\Controller\NewRecordController::showNewRecLink
[ "Returns", "TRUE", "if", "a", "link", "for", "creating", "new", "records", "should", "be", "displayed", "for", "$table" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Xclass/DatabaseRecordList.php#L2125-L2133
TYPO3-extensions/gridelements
Classes/Xclass/DatabaseRecordList.php
DatabaseRecordList.makeClip
public function makeClip($table, $row) { // Return blank, if disabled: if (!$this->getModule()->MOD_SETTINGS['clipBoard']) { return ''; } $cells = []; $cells['pasteAfter'] = ($cells['pasteInto'] = $this->spaceIcon); // Enables to hide the copy, cut and pas...
php
public function makeClip($table, $row) { // Return blank, if disabled: if (!$this->getModule()->MOD_SETTINGS['clipBoard']) { return ''; } $cells = []; $cells['pasteAfter'] = ($cells['pasteInto'] = $this->spaceIcon); // Enables to hide the copy, cut and pas...
[ "public", "function", "makeClip", "(", "$", "table", ",", "$", "row", ")", "{", "// Return blank, if disabled:", "if", "(", "!", "$", "this", "->", "getModule", "(", ")", "->", "MOD_SETTINGS", "[", "'clipBoard'", "]", ")", "{", "return", "''", ";", "}", ...
Creates the clipboard panel for a single record in the listing. @param string $table The table @param mixed[] $row The record for which to make the clipboard panel. @throws \UnexpectedValueException @return string HTML table with the clipboard panel (unless disabled)
[ "Creates", "the", "clipboard", "panel", "for", "a", "single", "record", "in", "the", "listing", "." ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Xclass/DatabaseRecordList.php#L2155-L2315
TYPO3-extensions/gridelements
Classes/Xclass/DatabaseRecordList.php
DatabaseRecordList.makeLocalizationPanel
public function makeLocalizationPanel($table, $row) { $out = [ 0 => '', 1 => '', ]; // Reset translations $this->translations = []; // Language title and icon: $out[0] = $this->languageFlag($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']...
php
public function makeLocalizationPanel($table, $row) { $out = [ 0 => '', 1 => '', ]; // Reset translations $this->translations = []; // Language title and icon: $out[0] = $this->languageFlag($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']...
[ "public", "function", "makeLocalizationPanel", "(", "$", "table", ",", "$", "row", ")", "{", "$", "out", "=", "[", "0", "=>", "''", ",", "1", "=>", "''", ",", "]", ";", "// Reset translations", "$", "this", "->", "translations", "=", "[", "]", ";", ...
Creates the localization panel @param string $table The table @param mixed[] $row The record for which to make the localization panel. @return string[] Array with key 0/1 with content for column 1 and 2
[ "Creates", "the", "localization", "panel" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Xclass/DatabaseRecordList.php#L2324-L2375
TYPO3-extensions/gridelements
Classes/Xclass/DatabaseRecordList.php
DatabaseRecordList.addElement
public function addElement($h, $icon, $data, $rowParams = '', $_ = '', $_2 = '', $colType = 'td', $level = 0) { if ($colType === 'pagination') { $colType = 'td'; $pagination = true; } else { $colType = ($colType === 'th') ? 'th' : 'td'; $pagination = f...
php
public function addElement($h, $icon, $data, $rowParams = '', $_ = '', $_2 = '', $colType = 'td', $level = 0) { if ($colType === 'pagination') { $colType = 'td'; $pagination = true; } else { $colType = ($colType === 'th') ? 'th' : 'td'; $pagination = f...
[ "public", "function", "addElement", "(", "$", "h", ",", "$", "icon", ",", "$", "data", ",", "$", "rowParams", "=", "''", ",", "$", "_", "=", "''", ",", "$", "_2", "=", "''", ",", "$", "colType", "=", "'td'", ",", "$", "level", "=", "0", ")", ...
Returns a table-row with the content from the fields in the input data array. OBS: $this->fieldArray MUST be set! (represents the list of fields to display) @param int $h Is an integer >=0 and denotes how tall an element is. Set to '0' makes a halv line, -1 = full line, set to 1 makes a 'join' and above makes 'line' @...
[ "Returns", "a", "table", "-", "row", "with", "the", "content", "from", "the", "fields", "in", "the", "input", "data", "array", ".", "OBS", ":", "$this", "-", ">", "fieldArray", "MUST", "be", "set!", "(", "represents", "the", "list", "of", "fields", "to...
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Xclass/DatabaseRecordList.php#L2392-L2515
TYPO3-extensions/gridelements
Classes/Xclass/DatabaseRecordList.php
DatabaseRecordList.renderListHeader
public function renderListHeader($table, $currentIdList) { $lang = $this->getLanguageService(); // Init: $theData = []; $icon = ''; /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */ $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriB...
php
public function renderListHeader($table, $currentIdList) { $lang = $this->getLanguageService(); // Init: $theData = []; $icon = ''; /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */ $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriB...
[ "public", "function", "renderListHeader", "(", "$", "table", ",", "$", "currentIdList", ")", "{", "$", "lang", "=", "$", "this", "->", "getLanguageService", "(", ")", ";", "// Init:", "$", "theData", "=", "[", "]", ";", "$", "icon", "=", "''", ";", "...
Rendering the header row for a table @param string $table Table name @param int[] $currentIdList Array of the currently displayed uids of the table @throws \UnexpectedValueException @throws RouteNotFoundException @return string Header table row @see getTable()
[ "Rendering", "the", "header", "row", "for", "a", "table" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Xclass/DatabaseRecordList.php#L2527-L2816
TYPO3-extensions/gridelements
Classes/Hooks/TtContentFlexForm.php
TtContentFlexForm.getDataStructureIdentifierPreProcess
public function getDataStructureIdentifierPreProcess(array $tca, $tableName, $fieldName, array $row) { if ($tableName === 'tt_content' && $fieldName === 'pi_flexform' && $row['CType'] === 'gridelements_pi1') { if (!empty($row['tx_gridelements_backend_layout'])) { $pageUid = $row[...
php
public function getDataStructureIdentifierPreProcess(array $tca, $tableName, $fieldName, array $row) { if ($tableName === 'tt_content' && $fieldName === 'pi_flexform' && $row['CType'] === 'gridelements_pi1') { if (!empty($row['tx_gridelements_backend_layout'])) { $pageUid = $row[...
[ "public", "function", "getDataStructureIdentifierPreProcess", "(", "array", "$", "tca", ",", "$", "tableName", ",", "$", "fieldName", ",", "array", "$", "row", ")", "{", "if", "(", "$", "tableName", "===", "'tt_content'", "&&", "$", "fieldName", "===", "'pi_...
Method to find flex form configuration of a tt_content gridelements content element. @param array $tca @param $tableName @param $fieldName @param array $row @return array
[ "Method", "to", "find", "flex", "form", "configuration", "of", "a", "tt_content", "gridelements", "content", "element", "." ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Hooks/TtContentFlexForm.php#L45-L88
TYPO3-extensions/gridelements
Classes/DataHandler/AbstractDataHandler.php
AbstractDataHandler.init
public function init($table, $uidPid, DataHandler $dataHandler) { $this->setTable($table); if ($table === 'tt_content' && (int)$uidPid < 0) { $this->setContentUid(abs($uidPid)); $pageUid = Helper::getInstance()->getPidFromUid($this->getContentUid()); $this->setPag...
php
public function init($table, $uidPid, DataHandler $dataHandler) { $this->setTable($table); if ($table === 'tt_content' && (int)$uidPid < 0) { $this->setContentUid(abs($uidPid)); $pageUid = Helper::getInstance()->getPidFromUid($this->getContentUid()); $this->setPag...
[ "public", "function", "init", "(", "$", "table", ",", "$", "uidPid", ",", "DataHandler", "$", "dataHandler", ")", "{", "$", "this", "->", "setTable", "(", "$", "table", ")", ";", "if", "(", "$", "table", "===", "'tt_content'", "&&", "(", "int", ")", ...
initializes this class @param string $table : The name of the table the data should be saved to @param int $uidPid : The uid of the record or page we are currently working on @param DataHandler $dataHandler
[ "initializes", "this", "class" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AbstractDataHandler.php#L78-L92
TYPO3-extensions/gridelements
Classes/DataHandler/AbstractDataHandler.php
AbstractDataHandler.cleanupWorkspacesAfterFinalizing
public function cleanupWorkspacesAfterFinalizing() { $queryBuilder = $this->getQueryBuilder(); $constraints = [ $queryBuilder->expr()->andX( $queryBuilder->expr()->eq( 'pid', $queryBuilder->createNamedParameter(-1, \PDO::PARAM_INT)...
php
public function cleanupWorkspacesAfterFinalizing() { $queryBuilder = $this->getQueryBuilder(); $constraints = [ $queryBuilder->expr()->andX( $queryBuilder->expr()->eq( 'pid', $queryBuilder->createNamedParameter(-1, \PDO::PARAM_INT)...
[ "public", "function", "cleanupWorkspacesAfterFinalizing", "(", ")", "{", "$", "queryBuilder", "=", "$", "this", "->", "getQueryBuilder", "(", ")", ";", "$", "constraints", "=", "[", "$", "queryBuilder", "->", "expr", "(", ")", "->", "andX", "(", "$", "quer...
Function to remove any remains of versioned records after finalizing a workspace action via 'Discard' or 'Publish' commands
[ "Function", "to", "remove", "any", "remains", "of", "versioned", "records", "after", "finalizing", "a", "workspace", "action", "via", "Discard", "or", "Publish", "commands" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AbstractDataHandler.php#L158-L182
TYPO3-extensions/gridelements
Classes/DataHandler/AbstractDataHandler.php
AbstractDataHandler.getQueryBuilder
public function getQueryBuilder($table = 'tt_content') { /**@var $queryBuilder QueryBuilder */ $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) ->getQueryBuilderForTable($table); $queryBuilder->getRestrictions() ->removeByType(HiddenRestriction::cla...
php
public function getQueryBuilder($table = 'tt_content') { /**@var $queryBuilder QueryBuilder */ $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) ->getQueryBuilderForTable($table); $queryBuilder->getRestrictions() ->removeByType(HiddenRestriction::cla...
[ "public", "function", "getQueryBuilder", "(", "$", "table", "=", "'tt_content'", ")", "{", "/**@var $queryBuilder QueryBuilder */", "$", "queryBuilder", "=", "GeneralUtility", "::", "makeInstance", "(", "ConnectionPool", "::", "class", ")", "->", "getQueryBuilderForTabl...
getter for queryBuilder @param string $table @return QueryBuilder $queryBuilder
[ "getter", "for", "queryBuilder" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AbstractDataHandler.php#L190-L201
TYPO3-extensions/gridelements
Classes/DataHandler/AbstractDataHandler.php
AbstractDataHandler.checkAndUpdateTranslatedElements
public function checkAndUpdateTranslatedElements($uid) { if ($uid <= 0) { return; } $queryBuilder = $this->getQueryBuilder(); $currentValues = $queryBuilder ->select( 'uid', 'tx_gridelements_container', 'tx_gride...
php
public function checkAndUpdateTranslatedElements($uid) { if ($uid <= 0) { return; } $queryBuilder = $this->getQueryBuilder(); $currentValues = $queryBuilder ->select( 'uid', 'tx_gridelements_container', 'tx_gride...
[ "public", "function", "checkAndUpdateTranslatedElements", "(", "$", "uid", ")", "{", "if", "(", "$", "uid", "<=", "0", ")", "{", "return", ";", "}", "$", "queryBuilder", "=", "$", "this", "->", "getQueryBuilder", "(", ")", ";", "$", "currentValues", "=",...
Function to handle record actions for current or former children of translated grid containers as well as translated references @param int $uid
[ "Function", "to", "handle", "record", "actions", "for", "current", "or", "former", "children", "of", "translated", "grid", "containers", "as", "well", "as", "translated", "references" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AbstractDataHandler.php#L209-L346
TYPO3-extensions/gridelements
Classes/DataHandler/AbstractDataHandler.php
AbstractDataHandler.doGridContainerUpdate
public function doGridContainerUpdate($containerUpdateArray = []) { if (is_array($containerUpdateArray) && !empty($containerUpdateArray)) { $queryBuilder = $this->getQueryBuilder(); $currentContainers = $queryBuilder ->select('uid', 'tx_gridelements_children') ...
php
public function doGridContainerUpdate($containerUpdateArray = []) { if (is_array($containerUpdateArray) && !empty($containerUpdateArray)) { $queryBuilder = $this->getQueryBuilder(); $currentContainers = $queryBuilder ->select('uid', 'tx_gridelements_children') ...
[ "public", "function", "doGridContainerUpdate", "(", "$", "containerUpdateArray", "=", "[", "]", ")", "{", "if", "(", "is_array", "(", "$", "containerUpdateArray", ")", "&&", "!", "empty", "(", "$", "containerUpdateArray", ")", ")", "{", "$", "queryBuilder", ...
Function to handle record actions between different grid containers @param array $containerUpdateArray
[ "Function", "to", "handle", "record", "actions", "between", "different", "grid", "containers" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AbstractDataHandler.php#L374-L398
TYPO3-extensions/gridelements
Classes/Hooks/PageRenderer.php
PageRenderer.addJSCSS
public function addJSCSS(array $parameters, \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer) { if (!empty($GLOBALS['SOBE']) && (get_class($GLOBALS['SOBE']) === RecordListController::class || is_subclass_of( $GLOBALS['SOBE'], RecordListController::class ))) { ...
php
public function addJSCSS(array $parameters, \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer) { if (!empty($GLOBALS['SOBE']) && (get_class($GLOBALS['SOBE']) === RecordListController::class || is_subclass_of( $GLOBALS['SOBE'], RecordListController::class ))) { ...
[ "public", "function", "addJSCSS", "(", "array", "$", "parameters", ",", "\\", "TYPO3", "\\", "CMS", "\\", "Core", "\\", "Page", "\\", "PageRenderer", "$", "pageRenderer", ")", "{", "if", "(", "!", "empty", "(", "$", "GLOBALS", "[", "'SOBE'", "]", ")", ...
wrapper function called by hook (\TYPO3\CMS\Core\Page\PageRenderer->render-preProcess) @param array $parameters An array of available parameters @param \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer The parent object that triggered this hook
[ "wrapper", "function", "called", "by", "hook", "(", "\\", "TYPO3", "\\", "CMS", "\\", "Core", "\\", "Page", "\\", "PageRenderer", "-", ">", "render", "-", "preProcess", ")" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Hooks/PageRenderer.php#L48-L149
TYPO3-extensions/gridelements
Classes/DataHandler/PreProcessFieldArray.php
PreProcessFieldArray.execute_preProcessFieldArray
public function execute_preProcessFieldArray(array &$fieldArray, $table, $id, DataHandler $parentObj) { if ($table === 'tt_content') { $this->init($table, $id, $parentObj); if (!$this->getTceMain()->isImporting) { $cmdId = ''; if (is_array($parentObj->...
php
public function execute_preProcessFieldArray(array &$fieldArray, $table, $id, DataHandler $parentObj) { if ($table === 'tt_content') { $this->init($table, $id, $parentObj); if (!$this->getTceMain()->isImporting) { $cmdId = ''; if (is_array($parentObj->...
[ "public", "function", "execute_preProcessFieldArray", "(", "array", "&", "$", "fieldArray", ",", "$", "table", ",", "$", "id", ",", "DataHandler", "$", "parentObj", ")", "{", "if", "(", "$", "table", "===", "'tt_content'", ")", "{", "$", "this", "->", "i...
Function to set the colPos of an element depending on whether it is a child of a parent container or not will set colPos according to availability of the current grid column of an element 0 = no column at all -1 = grid element column -2 = non used elements column changes are applied to the field array of the parent obj...
[ "Function", "to", "set", "the", "colPos", "of", "an", "element", "depending", "on", "whether", "it", "is", "a", "child", "of", "a", "parent", "container", "or", "not", "will", "set", "colPos", "according", "to", "availability", "of", "the", "current", "gri...
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/PreProcessFieldArray.php#L61-L76
TYPO3-extensions/gridelements
Classes/DataHandler/PreProcessFieldArray.php
PreProcessFieldArray.processFieldArrayForTtContent
public function processFieldArrayForTtContent(array &$fieldArray, $id = 0, $new = false) { $pid = (int)GeneralUtility::_GET('DDinsertNew'); if (abs($pid) > 0) { $this->setDefaultFieldValues($fieldArray, $pid); $this->getDefaultFlexformValues($fieldArray); } ...
php
public function processFieldArrayForTtContent(array &$fieldArray, $id = 0, $new = false) { $pid = (int)GeneralUtility::_GET('DDinsertNew'); if (abs($pid) > 0) { $this->setDefaultFieldValues($fieldArray, $pid); $this->getDefaultFlexformValues($fieldArray); } ...
[ "public", "function", "processFieldArrayForTtContent", "(", "array", "&", "$", "fieldArray", ",", "$", "id", "=", "0", ",", "$", "new", "=", "false", ")", "{", "$", "pid", "=", "(", "int", ")", "GeneralUtility", "::", "_GET", "(", "'DDinsertNew'", ")", ...
process field array for table tt_content @param array $fieldArray @param int $id @param bool $new
[ "process", "field", "array", "for", "table", "tt_content" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/PreProcessFieldArray.php#L85-L95
TYPO3-extensions/gridelements
Classes/DataHandler/PreProcessFieldArray.php
PreProcessFieldArray.setDefaultFieldValues
public function setDefaultFieldValues(array &$fieldArray, $uidPid = 0) { // Default values: $newRow = []; // Used to store default values as found here: // Default values as set in userTS: $TCAdefaultOverride = (array)($this->getBackendUser()->getTSConfig()['TCAdefaults'] ?? []); ...
php
public function setDefaultFieldValues(array &$fieldArray, $uidPid = 0) { // Default values: $newRow = []; // Used to store default values as found here: // Default values as set in userTS: $TCAdefaultOverride = (array)($this->getBackendUser()->getTSConfig()['TCAdefaults'] ?? []); ...
[ "public", "function", "setDefaultFieldValues", "(", "array", "&", "$", "fieldArray", ",", "$", "uidPid", "=", "0", ")", "{", "// Default values:", "$", "newRow", "=", "[", "]", ";", "// Used to store default values as found here:", "// Default values as set in userTS:",...
set default field values for new records @param array $fieldArray @param int $uidPid
[ "set", "default", "field", "values", "for", "new", "records" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/PreProcessFieldArray.php#L103-L167
TYPO3-extensions/gridelements
Classes/DataHandler/PreProcessFieldArray.php
PreProcessFieldArray.getDefaultFlexformValues
public function getDefaultFlexformValues(array &$fieldArray) { foreach ($GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds'] as $key => $dataStructure) { $types = GeneralUtility::trimExplode(',', $key); if (($types[0] === $fieldArray['list_type'] || $types[0] === '...
php
public function getDefaultFlexformValues(array &$fieldArray) { foreach ($GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds'] as $key => $dataStructure) { $types = GeneralUtility::trimExplode(',', $key); if (($types[0] === $fieldArray['list_type'] || $types[0] === '...
[ "public", "function", "getDefaultFlexformValues", "(", "array", "&", "$", "fieldArray", ")", "{", "foreach", "(", "$", "GLOBALS", "[", "'TCA'", "]", "[", "'tt_content'", "]", "[", "'columns'", "]", "[", "'pi_flexform'", "]", "[", "'config'", "]", "[", "'ds...
checks for default flexform values for new records and sets them accordingly @param array $fieldArray
[ "checks", "for", "default", "flexform", "values", "for", "new", "records", "and", "sets", "them", "accordingly" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/PreProcessFieldArray.php#L182-L190
TYPO3-extensions/gridelements
Classes/DataHandler/PreProcessFieldArray.php
PreProcessFieldArray.extractDefaultDataFromDataStructure
public function extractDefaultDataFromDataStructure($dataStructure) { $returnXML = ''; $sheetArray = []; if ($dataStructure) { $structureArray = GeneralUtility::xml2array($dataStructure); if (!isset($structureArray['sheets']) && isset($structureArray['ROOT'])) { ...
php
public function extractDefaultDataFromDataStructure($dataStructure) { $returnXML = ''; $sheetArray = []; if ($dataStructure) { $structureArray = GeneralUtility::xml2array($dataStructure); if (!isset($structureArray['sheets']) && isset($structureArray['ROOT'])) { ...
[ "public", "function", "extractDefaultDataFromDataStructure", "(", "$", "dataStructure", ")", "{", "$", "returnXML", "=", "''", ";", "$", "sheetArray", "=", "[", "]", ";", "if", "(", "$", "dataStructure", ")", "{", "$", "structureArray", "=", "GeneralUtility", ...
extracts the default data out of a given XML data structure @param string $dataStructure @return string $defaultData
[ "extracts", "the", "default", "data", "out", "of", "a", "given", "XML", "data", "structure" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/PreProcessFieldArray.php#L199-L231
TYPO3-extensions/gridelements
Classes/DataHandler/PreProcessFieldArray.php
PreProcessFieldArray.setFieldEntries
public function setFieldEntries(array &$fieldArray, $contentId = 0, $new = false) { $containerUpdateArray = []; if (isset($fieldArray['tx_gridelements_container'])) { if ((int)$fieldArray['tx_gridelements_container'] > 0 && $new) { $containerUpdateArray[(int)$fieldArray['...
php
public function setFieldEntries(array &$fieldArray, $contentId = 0, $new = false) { $containerUpdateArray = []; if (isset($fieldArray['tx_gridelements_container'])) { if ((int)$fieldArray['tx_gridelements_container'] > 0 && $new) { $containerUpdateArray[(int)$fieldArray['...
[ "public", "function", "setFieldEntries", "(", "array", "&", "$", "fieldArray", ",", "$", "contentId", "=", "0", ",", "$", "new", "=", "false", ")", "{", "$", "containerUpdateArray", "=", "[", "]", ";", "if", "(", "isset", "(", "$", "fieldArray", "[", ...
set initial entries to field array @param array $fieldArray @param int $contentId @param bool $new
[ "set", "initial", "entries", "to", "field", "array" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/PreProcessFieldArray.php#L240-L262
TYPO3-extensions/gridelements
Classes/DataHandler/PreProcessFieldArray.php
PreProcessFieldArray.setFieldEntriesForGridContainers
public function setFieldEntriesForGridContainers(array &$fieldArray) { if ((int)$fieldArray['tx_gridelements_container'] > 0 && isset($fieldArray['colPos']) && (int)$fieldArray['colPos'] !== -1) { $fieldArray['colPos'] = -1; $fieldArray['tx_gridelements_columns'] = 0; $ta...
php
public function setFieldEntriesForGridContainers(array &$fieldArray) { if ((int)$fieldArray['tx_gridelements_container'] > 0 && isset($fieldArray['colPos']) && (int)$fieldArray['colPos'] !== -1) { $fieldArray['colPos'] = -1; $fieldArray['tx_gridelements_columns'] = 0; $ta...
[ "public", "function", "setFieldEntriesForGridContainers", "(", "array", "&", "$", "fieldArray", ")", "{", "if", "(", "(", "int", ")", "$", "fieldArray", "[", "'tx_gridelements_container'", "]", ">", "0", "&&", "isset", "(", "$", "fieldArray", "[", "'colPos'", ...
set/override entries to gridelements container @param array $fieldArray
[ "set", "/", "override", "entries", "to", "gridelements", "container" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/PreProcessFieldArray.php#L269-L309
TYPO3-extensions/gridelements
Classes/DataHandler/PreProcessFieldArray.php
PreProcessFieldArray.checkForRootColumn
public function checkForRootColumn($contentId) { $queryBuilder = $this->getQueryBuilder(); $queryBuilder ->getRestrictions() ->removeAll(); $parent = $queryBuilder ->select('t1.colPos', 't1.tx_gridelements_container') ->from('tt_content', 't1')...
php
public function checkForRootColumn($contentId) { $queryBuilder = $this->getQueryBuilder(); $queryBuilder ->getRestrictions() ->removeAll(); $parent = $queryBuilder ->select('t1.colPos', 't1.tx_gridelements_container') ->from('tt_content', 't1')...
[ "public", "function", "checkForRootColumn", "(", "$", "contentId", ")", "{", "$", "queryBuilder", "=", "$", "this", "->", "getQueryBuilder", "(", ")", ";", "$", "queryBuilder", "->", "getRestrictions", "(", ")", "->", "removeAll", "(", ")", ";", "$", "pare...
Function to recursively determine the colPos of the root container so that an element that has been removed from any container will still remain in the same major page column @param int $contentId The uid of the current content element @return int The new column of this content element
[ "Function", "to", "recursively", "determine", "the", "colPos", "of", "the", "root", "container", "so", "that", "an", "element", "that", "has", "been", "removed", "from", "any", "container", "will", "still", "remain", "in", "the", "same", "major", "page", "co...
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/PreProcessFieldArray.php#L320-L350
TYPO3-extensions/gridelements
Classes/DataHandler/ProcessCmdmap.php
ProcessCmdmap.execute_processCmdmap
public function execute_processCmdmap( $command, $table, $id, $value, &$commandIsProcessed, DataHandler $parentObj = null, $pasteUpdate = false ) { $this->init($table, $id, $parentObj); $reference = (int)GeneralUtility::_GET('reference'); ...
php
public function execute_processCmdmap( $command, $table, $id, $value, &$commandIsProcessed, DataHandler $parentObj = null, $pasteUpdate = false ) { $this->init($table, $id, $parentObj); $reference = (int)GeneralUtility::_GET('reference'); ...
[ "public", "function", "execute_processCmdmap", "(", "$", "command", ",", "$", "table", ",", "$", "id", ",", "$", "value", ",", "&", "$", "commandIsProcessed", ",", "DataHandler", "$", "parentObj", "=", "null", ",", "$", "pasteUpdate", "=", "false", ")", ...
Function to process the drag & drop copy action @param string $command The command to be handled by the command map @param string $table The name of the table we are working on @param int $id The id of the record that is going to be copied @param string $value The value that has been sent with the copy command @param ...
[ "Function", "to", "process", "the", "drag", "&", "drop", "copy", "action" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/ProcessCmdmap.php#L45-L112
TYPO3-extensions/gridelements
Classes/Backend/ItemsProcFuncs/CTypeList.php
CTypeList.itemsProcFunc
public function itemsProcFunc(array &$params) { if ((int)$params['row']['pid'] > 0) { $colPos = is_array($params['row']['colPos']) ? $params['row']['colPos'][0] : $params['row']['colPos']; $this->checkForAllowedCTypes( $params['items'], $params['row'][...
php
public function itemsProcFunc(array &$params) { if ((int)$params['row']['pid'] > 0) { $colPos = is_array($params['row']['colPos']) ? $params['row']['colPos'][0] : $params['row']['colPos']; $this->checkForAllowedCTypes( $params['items'], $params['row'][...
[ "public", "function", "itemsProcFunc", "(", "array", "&", "$", "params", ")", "{", "if", "(", "(", "int", ")", "$", "params", "[", "'row'", "]", "[", "'pid'", "]", ">", "0", ")", "{", "$", "colPos", "=", "is_array", "(", "$", "params", "[", "'row...
ItemProcFunc for CType items @param array $params The array of parameters that is used to render the item list
[ "ItemProcFunc", "for", "CType", "items" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Backend/ItemsProcFuncs/CTypeList.php#L45-L71
TYPO3-extensions/gridelements
Classes/Backend/ItemsProcFuncs/CTypeList.php
CTypeList.checkForAllowedCTypes
public function checkForAllowedCTypes(array &$items, $pageId, $pageColumn, $gridContainerId, $gridColumn) { $allowed = []; $disallowed = []; if ((int)$pageColumn >= 0 || (int)$pageColumn === -2) { $column = $pageColumn ? $pageColumn : 0; $layout = $this->getSelectedBa...
php
public function checkForAllowedCTypes(array &$items, $pageId, $pageColumn, $gridContainerId, $gridColumn) { $allowed = []; $disallowed = []; if ((int)$pageColumn >= 0 || (int)$pageColumn === -2) { $column = $pageColumn ? $pageColumn : 0; $layout = $this->getSelectedBa...
[ "public", "function", "checkForAllowedCTypes", "(", "array", "&", "$", "items", ",", "$", "pageId", ",", "$", "pageColumn", ",", "$", "gridContainerId", ",", "$", "gridColumn", ")", "{", "$", "allowed", "=", "[", "]", ";", "$", "disallowed", "=", "[", ...
Checks if a CType is allowed in this particular page or grid column - only this one column defines the allowed CTypes regardless of any parent column @param array $items The items of the current CType list @param int $pageId The id of the page we are currently working on @param int $pageColumn The page column the elem...
[ "Checks", "if", "a", "CType", "is", "allowed", "in", "this", "particular", "page", "or", "grid", "column", "-", "only", "this", "one", "column", "defines", "the", "allowed", "CTypes", "regardless", "of", "any", "parent", "column" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Backend/ItemsProcFuncs/CTypeList.php#L82-L121
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.main
public function main($content = '', $conf = []) { // first we have to take care of possible flexform values containing additional information // that is not available via DB relations. It will be added as "virtual" key to the existing data Array // so that you can easily get the values with ...
php
public function main($content = '', $conf = []) { // first we have to take care of possible flexform values containing additional information // that is not available via DB relations. It will be added as "virtual" key to the existing data Array // so that you can easily get the values with ...
[ "public", "function", "main", "(", "$", "content", "=", "''", ",", "$", "conf", "=", "[", "]", ")", "{", "// first we have to take care of possible flexform values containing additional information", "// that is not available via DB relations. It will be added as \"virtual\" key to...
The main method of the PlugIn @param string $content The PlugIn content @param array $conf The PlugIn configuration @return string The content that is displayed on the website
[ "The", "main", "method", "of", "the", "PlugIn" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L83-L148
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.initPluginFlexForm
public function initPluginFlexForm($field = 'pi_flexform', &$child = null) { // Converting flexform data into array: if (!empty($child)) { if (!is_array($child[$field]) && $child[$field]) { $child[$field] = GeneralUtility::xml2array($child[$field]); if (!i...
php
public function initPluginFlexForm($field = 'pi_flexform', &$child = null) { // Converting flexform data into array: if (!empty($child)) { if (!is_array($child[$field]) && $child[$field]) { $child[$field] = GeneralUtility::xml2array($child[$field]); if (!i...
[ "public", "function", "initPluginFlexForm", "(", "$", "field", "=", "'pi_flexform'", ",", "&", "$", "child", "=", "null", ")", "{", "// Converting flexform data into array:", "if", "(", "!", "empty", "(", "$", "child", ")", ")", "{", "if", "(", "!", "is_ar...
Converts $this->cObj->data['pi_flexform'] from XML string to flexForm array. @param string $field Field name to convert @param array $child
[ "Converts", "$this", "-", ">", "cObj", "-", ">", "data", "[", "pi_flexform", "]", "from", "XML", "string", "to", "flexForm", "array", "." ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L156-L172
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.getPluginFlexFormData
public function getPluginFlexFormData(&$child = []) { if (!empty($child)) { $cObjData = $child; } else { $cObjData = $this->cObj->data; } $pluginFlexForm = $cObjData['pi_flexform']; if (is_array($pluginFlexForm) && is_array($pluginFlexForm['data'])) ...
php
public function getPluginFlexFormData(&$child = []) { if (!empty($child)) { $cObjData = $child; } else { $cObjData = $this->cObj->data; } $pluginFlexForm = $cObjData['pi_flexform']; if (is_array($pluginFlexForm) && is_array($pluginFlexForm['data'])) ...
[ "public", "function", "getPluginFlexFormData", "(", "&", "$", "child", "=", "[", "]", ")", "{", "if", "(", "!", "empty", "(", "$", "child", ")", ")", "{", "$", "cObjData", "=", "$", "child", ";", "}", "else", "{", "$", "cObjData", "=", "$", "this...
fetches values from the grid flexform and assigns them to virtual fields in the data array @param array $child
[ "fetches", "values", "from", "the", "grid", "flexform", "and", "assigns", "them", "to", "virtual", "fields", "in", "the", "data", "array" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L178-L215
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.getFlexFormValue
public function getFlexFormValue( $T3FlexForm_array, $fieldName, $sheet = 'sDEF', $language = 'lDEF', $value = 'vDEF' ) { $sheetArray = is_array($T3FlexForm_array) ? $T3FlexForm_array['data'][$sheet][$language] : ''; if (is_array($sheetArray)) { re...
php
public function getFlexFormValue( $T3FlexForm_array, $fieldName, $sheet = 'sDEF', $language = 'lDEF', $value = 'vDEF' ) { $sheetArray = is_array($T3FlexForm_array) ? $T3FlexForm_array['data'][$sheet][$language] : ''; if (is_array($sheetArray)) { re...
[ "public", "function", "getFlexFormValue", "(", "$", "T3FlexForm_array", ",", "$", "fieldName", ",", "$", "sheet", "=", "'sDEF'", ",", "$", "language", "=", "'lDEF'", ",", "$", "value", "=", "'vDEF'", ")", "{", "$", "sheetArray", "=", "is_array", "(", "$"...
Return value from somewhere inside a FlexForm structure @param array $T3FlexForm_array FlexForm data @param string $fieldName Field name to extract. Can be given like "test/el/2/test/el/field_templateObject" where each part will dig a level deeper in the FlexForm data. @param string $sheet Sheet pointer, eg. "sDEF" @p...
[ "Return", "value", "from", "somewhere", "inside", "a", "FlexForm", "structure" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L228-L240
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.getFlexFormValueFromSheetArray
public function getFlexFormValueFromSheetArray($sheetArray, $fieldNameArr, $value) { $tempArr = $sheetArray; foreach ($fieldNameArr as $k => $v) { $checkedValue = MathUtility::canBeInterpretedAsInteger($v); if ($checkedValue) { if (is_array($tempArr)) { ...
php
public function getFlexFormValueFromSheetArray($sheetArray, $fieldNameArr, $value) { $tempArr = $sheetArray; foreach ($fieldNameArr as $k => $v) { $checkedValue = MathUtility::canBeInterpretedAsInteger($v); if ($checkedValue) { if (is_array($tempArr)) { ...
[ "public", "function", "getFlexFormValueFromSheetArray", "(", "$", "sheetArray", ",", "$", "fieldNameArr", ",", "$", "value", ")", "{", "$", "tempArr", "=", "$", "sheetArray", ";", "foreach", "(", "$", "fieldNameArr", "as", "$", "k", "=>", "$", "v", ")", ...
Returns part of $sheetArray pointed to by the keys in $fieldNameArray @param array $sheetArray Multidimensional array, typically FlexForm contents @param array $fieldNameArr Array where each value points to a key in the FlexForms content - the input array will have the value returned pointed to by these keys. All inte...
[ "Returns", "part", "of", "$sheetArray", "pointed", "to", "by", "the", "keys", "in", "$fieldNameArray" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L252-L283
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.getFlexformSectionsRecursively
public function getFlexformSectionsRecursively($dataArr, $valueKey = 'vDEF') { $out = []; foreach ($dataArr as $k => $el) { if (is_array($el) && is_array($el['el'])) { $out[$k] = $this->getFlexformSectionsRecursively($el['el']); } elseif (is_array($el) && is_a...
php
public function getFlexformSectionsRecursively($dataArr, $valueKey = 'vDEF') { $out = []; foreach ($dataArr as $k => $el) { if (is_array($el) && is_array($el['el'])) { $out[$k] = $this->getFlexformSectionsRecursively($el['el']); } elseif (is_array($el) && is_a...
[ "public", "function", "getFlexformSectionsRecursively", "(", "$", "dataArr", ",", "$", "valueKey", "=", "'vDEF'", ")", "{", "$", "out", "=", "[", "]", ";", "foreach", "(", "$", "dataArr", "as", "$", "k", "=>", "$", "el", ")", "{", "if", "(", "is_arra...
@param $dataArr @param string $valueKey @return array
[ "@param", "$dataArr", "@param", "string", "$valueKey" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L291-L305
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.getChildren
public function getChildren($element = 0, $pid = 0, $csvColumns = '') { if (!$element || $csvColumns === '') { return; } $csvColumns = GeneralUtility::intExplode(',', $csvColumns); $queryBuilder = $this->getQueryBuilder(); $where = $queryBuilder->expr()->andX( ...
php
public function getChildren($element = 0, $pid = 0, $csvColumns = '') { if (!$element || $csvColumns === '') { return; } $csvColumns = GeneralUtility::intExplode(',', $csvColumns); $queryBuilder = $this->getQueryBuilder(); $where = $queryBuilder->expr()->andX( ...
[ "public", "function", "getChildren", "(", "$", "element", "=", "0", ",", "$", "pid", "=", "0", ",", "$", "csvColumns", "=", "''", ")", "{", "if", "(", "!", "$", "element", "||", "$", "csvColumns", "===", "''", ")", "{", "return", ";", "}", "$", ...
fetches all available children for a certain grid container @param int $element The uid of the grid container @param int $pid @param string $csvColumns A list of available column IDs
[ "fetches", "all", "available", "children", "for", "a", "certain", "grid", "container" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L322-L461
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.getQueryBuilder
public function getQueryBuilder() { /** @var $queryBuilder QueryBuilder */ $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) ->getQueryBuilderForTable('tt_content'); $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class)...
php
public function getQueryBuilder() { /** @var $queryBuilder QueryBuilder */ $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) ->getQueryBuilderForTable('tt_content'); $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class)...
[ "public", "function", "getQueryBuilder", "(", ")", "{", "/** @var $queryBuilder QueryBuilder */", "$", "queryBuilder", "=", "GeneralUtility", "::", "makeInstance", "(", "ConnectionPool", "::", "class", ")", "->", "getQueryBuilderForTable", "(", "'tt_content'", ")", ";",...
getter for queryBuilder @return QueryBuilder queryBuilder
[ "getter", "for", "queryBuilder" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L468-L475
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.renderChildrenIntoParentColumns
public function renderChildrenIntoParentColumns($typoScriptSetup = [], $sortColumns = []) { // first we have to make a backup copy of the original data array // and we have to modify the depth counter to avoid stopping too early $currentParentGrid = $this->copyCurrentParentGrid(); ...
php
public function renderChildrenIntoParentColumns($typoScriptSetup = [], $sortColumns = []) { // first we have to make a backup copy of the original data array // and we have to modify the depth counter to avoid stopping too early $currentParentGrid = $this->copyCurrentParentGrid(); ...
[ "public", "function", "renderChildrenIntoParentColumns", "(", "$", "typoScriptSetup", "=", "[", "]", ",", "$", "sortColumns", "=", "[", "]", ")", "{", "// first we have to make a backup copy of the original data array", "// and we have to modify the depth counter to avoid stoppin...
renders the children of the grid container and puts them into their respective columns @param array $typoScriptSetup @param array $sortColumns An Array of column positions within the grid container in the order they got in the grid setup
[ "renders", "the", "children", "of", "the", "grid", "container", "and", "puts", "them", "into", "their", "respective", "columns" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L484-L539
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.getUsedColumns
public function getUsedColumns($sortColumns = []) { $columns = []; // we need the array values as keys if (!empty($sortColumns)) { foreach ($sortColumns as $column_number) { $columns[$column_number] = ''; } } return $columns; }
php
public function getUsedColumns($sortColumns = []) { $columns = []; // we need the array values as keys if (!empty($sortColumns)) { foreach ($sortColumns as $column_number) { $columns[$column_number] = ''; } } return $columns; }
[ "public", "function", "getUsedColumns", "(", "$", "sortColumns", "=", "[", "]", ")", "{", "$", "columns", "=", "[", "]", ";", "// we need the array values as keys", "if", "(", "!", "empty", "(", "$", "sortColumns", ")", ")", "{", "foreach", "(", "$", "so...
@param array $sortColumns @return array
[ "@param", "array", "$sortColumns" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L558-L568
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.getParentGridData
public function getParentGridData($data = []) { // filter out existing superfluous keys to reduce memory load // String comparisons are way too expensive, so we go for unset within some loops if (!empty($data['tx_gridelements_view_children'])) { foreach ($data['tx_gridelements_vi...
php
public function getParentGridData($data = []) { // filter out existing superfluous keys to reduce memory load // String comparisons are way too expensive, so we go for unset within some loops if (!empty($data['tx_gridelements_view_children'])) { foreach ($data['tx_gridelements_vi...
[ "public", "function", "getParentGridData", "(", "$", "data", "=", "[", "]", ")", "{", "// filter out existing superfluous keys to reduce memory load", "// String comparisons are way too expensive, so we go for unset within some loops", "if", "(", "!", "empty", "(", "$", "data",...
@param $data @return array
[ "@param", "$data" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L575-L605
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.setParentGridData
public function setParentGridData($data = []) { $parentGridData = []; foreach ($data as $key => $value) { $parentGridData['parentgrid_' . $key] = $value; } return $parentGridData; }
php
public function setParentGridData($data = []) { $parentGridData = []; foreach ($data as $key => $value) { $parentGridData['parentgrid_' . $key] = $value; } return $parentGridData; }
[ "public", "function", "setParentGridData", "(", "$", "data", "=", "[", "]", ")", "{", "$", "parentGridData", "=", "[", "]", ";", "foreach", "(", "$", "data", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "parentGridData", "[", "'parentgrid_'", ...
@param array $data @return array
[ "@param", "array", "$data" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L612-L619
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.renderChildIntoParentColumn
public function renderChildIntoParentColumn( $columns, &$child, &$parentGridData, &$parentRecordNumbers, $typoScriptSetup = [] ) { $column_number = (int)$child['tx_gridelements_columns']; $columnKey = $column_number . '.'; $columnSetupKey = isset($typo...
php
public function renderChildIntoParentColumn( $columns, &$child, &$parentGridData, &$parentRecordNumbers, $typoScriptSetup = [] ) { $column_number = (int)$child['tx_gridelements_columns']; $columnKey = $column_number . '.'; $columnSetupKey = isset($typo...
[ "public", "function", "renderChildIntoParentColumn", "(", "$", "columns", ",", "&", "$", "child", ",", "&", "$", "parentGridData", ",", "&", "$", "parentRecordNumbers", ",", "$", "typoScriptSetup", "=", "[", "]", ")", "{", "$", "column_number", "=", "(", "...
renders the columns of the grid container and returns the actual content @param array $columns @param array $child @param array $parentGridData @param array $parentRecordNumbers @param array $typoScriptSetup
[ "renders", "the", "columns", "of", "the", "grid", "container", "and", "returns", "the", "actual", "content" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L630-L660
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.renderColumnsIntoParentGrid
public function renderColumnsIntoParentGrid($setup = []) { if (empty($this->cObj->data['tx_gridelements_view_columns'])) { return ''; } $content = ''; foreach ($this->cObj->data['tx_gridelements_view_columns'] as $column => $columnContent) { // if there are an...
php
public function renderColumnsIntoParentGrid($setup = []) { if (empty($this->cObj->data['tx_gridelements_view_columns'])) { return ''; } $content = ''; foreach ($this->cObj->data['tx_gridelements_view_columns'] as $column => $columnContent) { // if there are an...
[ "public", "function", "renderColumnsIntoParentGrid", "(", "$", "setup", "=", "[", "]", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "cObj", "->", "data", "[", "'tx_gridelements_view_columns'", "]", ")", ")", "{", "return", "''", ";", "}", "$", ...
renders the columns of the grid container and returns the actual content @param array $setup The adjusted setup of the grid container @return string $content The raw HTML output of the grid container before stdWrap functions will be applied to it
[ "renders", "the", "columns", "of", "the", "grid", "container", "and", "returns", "the", "actual", "content" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L669-L691
TYPO3-extensions/gridelements
Classes/Plugin/Gridelements.php
Gridelements.user_getTreeList
public function user_getTreeList() { $pidList = $this->getTSFE()->register['tt_content_shortcut_recursive'] ? $this->cObj->getTreeList( $this->cObj->data['uid'], $this->getTSFE()->register['tt_content_shortcut_recursive'] ) : ''; $t...
php
public function user_getTreeList() { $pidList = $this->getTSFE()->register['tt_content_shortcut_recursive'] ? $this->cObj->getTreeList( $this->cObj->data['uid'], $this->getTSFE()->register['tt_content_shortcut_recursive'] ) : ''; $t...
[ "public", "function", "user_getTreeList", "(", ")", "{", "$", "pidList", "=", "$", "this", "->", "getTSFE", "(", ")", "->", "register", "[", "'tt_content_shortcut_recursive'", "]", "?", "$", "this", "->", "cObj", "->", "getTreeList", "(", "$", "this", "->"...
renders a recursive pidList to reference content from a list of pages
[ "renders", "a", "recursive", "pidList", "to", "reference", "content", "from", "a", "list", "of", "pages" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Plugin/Gridelements.php#L707-L716
TYPO3-extensions/gridelements
Classes/Backend/ItemsProcFuncs/ColPosList.php
ColPosList.itemsProcFunc
public function itemsProcFunc(array &$params) { $this->init(); if ($params['row']['pid'] > 0) { $contentType = is_array($params['row']['CType']) ? $params['row']['CType'][0] : $params['row']['CType']; $listType = is_array($params['row']['list_type']) ? $params['row']['list_ty...
php
public function itemsProcFunc(array &$params) { $this->init(); if ($params['row']['pid'] > 0) { $contentType = is_array($params['row']['CType']) ? $params['row']['CType'][0] : $params['row']['CType']; $listType = is_array($params['row']['list_type']) ? $params['row']['list_ty...
[ "public", "function", "itemsProcFunc", "(", "array", "&", "$", "params", ")", "{", "$", "this", "->", "init", "(", ")", ";", "if", "(", "$", "params", "[", "'row'", "]", "[", "'pid'", "]", ">", "0", ")", "{", "$", "contentType", "=", "is_array", ...
ItemProcFunc for colpos items @param array $params The array of parameters that is used to render the item list
[ "ItemProcFunc", "for", "colpos", "items" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Backend/ItemsProcFuncs/ColPosList.php#L37-L71
TYPO3-extensions/gridelements
Classes/Backend/ItemsProcFuncs/ColPosList.php
ColPosList.addColPosListLayoutItems
protected function addColPosListLayoutItems( $pageId, array $items, $contentType = '', $listType = '', $gridType = '', $container = 0 ) { if (empty($container)) { $layout = $this->getSelectedBackendLayout($pageId); if ($layout) { ...
php
protected function addColPosListLayoutItems( $pageId, array $items, $contentType = '', $listType = '', $gridType = '', $container = 0 ) { if (empty($container)) { $layout = $this->getSelectedBackendLayout($pageId); if ($layout) { ...
[ "protected", "function", "addColPosListLayoutItems", "(", "$", "pageId", ",", "array", "$", "items", ",", "$", "contentType", "=", "''", ",", "$", "listType", "=", "''", ",", "$", "gridType", "=", "''", ",", "$", "container", "=", "0", ")", "{", "if", ...
Adds items to a colpos list @param int $pageId The uid of the page we are currently working on @param array $items The array of items before the action @param string $contentType The content type of the item holding the colPosList @param string $listType The list type of the item holding the colPosList @param string $...
[ "Adds", "items", "to", "a", "colpos", "list" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Backend/ItemsProcFuncs/ColPosList.php#L85-L161
TYPO3-extensions/gridelements
Classes/Helper/Helper.php
Helper.getPidFromUid
public function getPidFromUid($uid = 0) { $queryBuilder = self::getQueryBuilder(); $triggerElement = $queryBuilder ->select('pid') ->from('tt_content') ->where( $queryBuilder->expr()->eq( 'uid', $queryBuilder...
php
public function getPidFromUid($uid = 0) { $queryBuilder = self::getQueryBuilder(); $triggerElement = $queryBuilder ->select('pid') ->from('tt_content') ->where( $queryBuilder->expr()->eq( 'uid', $queryBuilder...
[ "public", "function", "getPidFromUid", "(", "$", "uid", "=", "0", ")", "{", "$", "queryBuilder", "=", "self", "::", "getQueryBuilder", "(", ")", ";", "$", "triggerElement", "=", "$", "queryBuilder", "->", "select", "(", "'pid'", ")", "->", "from", "(", ...
converts tt_content uid into a pid @param int $uid the uid value of a tt_content record @return int
[ "converts", "tt_content", "uid", "into", "a", "pid" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Helper/Helper.php#L172-L188
TYPO3-extensions/gridelements
Classes/Helper/Helper.php
Helper.getSpecificIds
public function getSpecificIds(array $record) { $specificIds = []; $specificIds['uid'] = (int)$record['uid']; $specificIds['pid'] = (int)$record['pid']; if (self::getBackendUser()->workspace > 0 && !empty($record['t3ver_oid'])) { $specificIds['uid'] = (int)$record['t3ver...
php
public function getSpecificIds(array $record) { $specificIds = []; $specificIds['uid'] = (int)$record['uid']; $specificIds['pid'] = (int)$record['pid']; if (self::getBackendUser()->workspace > 0 && !empty($record['t3ver_oid'])) { $specificIds['uid'] = (int)$record['t3ver...
[ "public", "function", "getSpecificIds", "(", "array", "$", "record", ")", "{", "$", "specificIds", "=", "[", "]", ";", "$", "specificIds", "[", "'uid'", "]", "=", "(", "int", ")", "$", "record", "[", "'uid'", "]", ";", "$", "specificIds", "[", "'pid'...
Gets the uid of a record depending on the current context. If in workspace mode, the overlay uid is used (if available), otherwise the regular uid is used. @param array $record Overlaid record data @return int[]
[ "Gets", "the", "uid", "of", "a", "record", "depending", "on", "the", "current", "context", ".", "If", "in", "workspace", "mode", "the", "overlay", "uid", "is", "used", "(", "if", "available", ")", "otherwise", "the", "regular", "uid", "is", "used", "." ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Helper/Helper.php#L216-L228
TYPO3-extensions/gridelements
Classes/DataProcessing/GridChildrenProcessor.php
GridChildrenProcessor.process
public function process( ContentObjectRenderer $cObj, array $contentObjectConfiguration, array $processorConfiguration, array $processedData ) { if ( $processedData['data']['CType'] !== 'gridelements_pi1' || empty($processorConfiguration) ) { ...
php
public function process( ContentObjectRenderer $cObj, array $contentObjectConfiguration, array $processorConfiguration, array $processedData ) { if ( $processedData['data']['CType'] !== 'gridelements_pi1' || empty($processorConfiguration) ) { ...
[ "public", "function", "process", "(", "ContentObjectRenderer", "$", "cObj", ",", "array", "$", "contentObjectConfiguration", ",", "array", "$", "processorConfiguration", ",", "array", "$", "processedData", ")", "{", "if", "(", "$", "processedData", "[", "'data'", ...
Fetches records from the database as an array @param ContentObjectRenderer $cObj The data of the content element or page @param array $contentObjectConfiguration The configuration of Content Object @param array $processorConfiguration The configuration of this processor @param array $processedData Key/value store of p...
[ "Fetches", "records", "from", "the", "database", "as", "an", "array" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataProcessing/GridChildrenProcessor.php#L115-L189
TYPO3-extensions/gridelements
Classes/DataProcessing/GridChildrenProcessor.php
GridChildrenProcessor.processChildRecord
protected function processChildRecord($record) { $id = (int)$record['uid']; $this->checkOptions($record); /* @var $recordContentObjectRenderer ContentObjectRenderer */ $recordContentObjectRenderer = GeneralUtility::makeInstance(ContentObjectRenderer::class); $recordContentObj...
php
protected function processChildRecord($record) { $id = (int)$record['uid']; $this->checkOptions($record); /* @var $recordContentObjectRenderer ContentObjectRenderer */ $recordContentObjectRenderer = GeneralUtility::makeInstance(ContentObjectRenderer::class); $recordContentObj...
[ "protected", "function", "processChildRecord", "(", "$", "record", ")", "{", "$", "id", "=", "(", "int", ")", "$", "record", "[", "'uid'", "]", ";", "$", "this", "->", "checkOptions", "(", "$", "record", ")", ";", "/* @var $recordContentObjectRenderer Conten...
Processes child records recursively to get other children into the same array @param $record
[ "Processes", "child", "records", "recursively", "to", "get", "other", "children", "into", "the", "same", "array" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataProcessing/GridChildrenProcessor.php#L223-L252
TYPO3-extensions/gridelements
Classes/Wizard/GridelementsBackendLayoutWizardElement.php
GridelementsBackendLayoutWizardElement.init
protected function init() { if (empty($this->data['databaseRow']['config'])) { $rows = [[['colspan' => 1, 'rowspan' => 1, 'spanned' => 0, 'name' => '0x0']]]; $colCount = 1; $rowCount = 1; } else { /** @var LayoutSetup $layoutSetup */ $layou...
php
protected function init() { if (empty($this->data['databaseRow']['config'])) { $rows = [[['colspan' => 1, 'rowspan' => 1, 'spanned' => 0, 'name' => '0x0']]]; $colCount = 1; $rowCount = 1; } else { /** @var LayoutSetup $layoutSetup */ $layou...
[ "protected", "function", "init", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "data", "[", "'databaseRow'", "]", "[", "'config'", "]", ")", ")", "{", "$", "rows", "=", "[", "[", "[", "'colspan'", "=>", "1", ",", "'rowspan'", "=>", "...
Initialize wizard
[ "Initialize", "wizard" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Wizard/GridelementsBackendLayoutWizardElement.php#L232-L337
TYPO3-extensions/gridelements
Classes/Hooks/WizardItems.php
WizardItems.manipulateWizardItems
public function manipulateWizardItems(&$wizardItems, &$parentObject) { if (!$this->getBackendUser()->checkAuthMode( 'tt_content', 'CType', 'gridelements_pi1', $GLOBALS['TYPO3_CONF_VARS']['BE']['explicitADmode'] )) { return; } ...
php
public function manipulateWizardItems(&$wizardItems, &$parentObject) { if (!$this->getBackendUser()->checkAuthMode( 'tt_content', 'CType', 'gridelements_pi1', $GLOBALS['TYPO3_CONF_VARS']['BE']['explicitADmode'] )) { return; } ...
[ "public", "function", "manipulateWizardItems", "(", "&", "$", "wizardItems", ",", "&", "$", "parentObject", ")", "{", "if", "(", "!", "$", "this", "->", "getBackendUser", "(", ")", "->", "checkAuthMode", "(", "'tt_content'", ",", "'CType'", ",", "'gridelemen...
Processes the items of the new content element wizard and inserts necessary default values for items created within a grid @param array $wizardItems The array containing the current status of the wizard item list before rendering @param NewContentElementController $parentObject The parent object that triggered this ho...
[ "Processes", "the", "items", "of", "the", "new", "content", "element", "wizard", "and", "inserts", "necessary", "default", "values", "for", "items", "created", "within", "a", "grid" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Hooks/WizardItems.php#L64-L126
TYPO3-extensions/gridelements
Classes/Hooks/WizardItems.php
WizardItems.init
public function init($pageUid) { if (!$this->layoutSetup instanceof LayoutSetup) { $this->layoutSetup = GeneralUtility::makeInstance(LayoutSetup::class)->init($pageUid); } }
php
public function init($pageUid) { if (!$this->layoutSetup instanceof LayoutSetup) { $this->layoutSetup = GeneralUtility::makeInstance(LayoutSetup::class)->init($pageUid); } }
[ "public", "function", "init", "(", "$", "pageUid", ")", "{", "if", "(", "!", "$", "this", "->", "layoutSetup", "instanceof", "LayoutSetup", ")", "{", "$", "this", "->", "layoutSetup", "=", "GeneralUtility", "::", "makeInstance", "(", "LayoutSetup", "::", "...
initializes this class @param int $pageUid
[ "initializes", "this", "class" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Hooks/WizardItems.php#L133-L138
TYPO3-extensions/gridelements
Classes/Hooks/WizardItems.php
WizardItems.removeDisallowedWizardItems
public function removeDisallowedWizardItems(array $allowed, array $disallowed, array &$wizardItems) { foreach ($wizardItems as $key => $wizardItem) { if (!$wizardItems[$key]['header']) { if ( ( !empty($allowed['CType']) && ...
php
public function removeDisallowedWizardItems(array $allowed, array $disallowed, array &$wizardItems) { foreach ($wizardItems as $key => $wizardItem) { if (!$wizardItems[$key]['header']) { if ( ( !empty($allowed['CType']) && ...
[ "public", "function", "removeDisallowedWizardItems", "(", "array", "$", "allowed", ",", "array", "$", "disallowed", ",", "array", "&", "$", "wizardItems", ")", "{", "foreach", "(", "$", "wizardItems", "as", "$", "key", "=>", "$", "wizardItem", ")", "{", "i...
remove disallowed content elements from wizard items @param array $allowed @param array $disallowed @param array $wizardItems
[ "remove", "disallowed", "content", "elements", "from", "wizard", "items" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Hooks/WizardItems.php#L147-L181
TYPO3-extensions/gridelements
Classes/Hooks/WizardItems.php
WizardItems.getExcludeLayouts
public function getExcludeLayouts($container, NewContentElementController $parentObject) { $excludeLayouts = 0; $excludeArray = []; $pageID = $parentObject->id; $TSconfig = BackendUtility::getPagesTSconfig($pageID); if ($container && $TSconfig['TCEFORM.']['tt_content.']['t...
php
public function getExcludeLayouts($container, NewContentElementController $parentObject) { $excludeLayouts = 0; $excludeArray = []; $pageID = $parentObject->id; $TSconfig = BackendUtility::getPagesTSconfig($pageID); if ($container && $TSconfig['TCEFORM.']['tt_content.']['t...
[ "public", "function", "getExcludeLayouts", "(", "$", "container", ",", "NewContentElementController", "$", "parentObject", ")", "{", "$", "excludeLayouts", "=", "0", ";", "$", "excludeArray", "=", "[", "]", ";", "$", "pageID", "=", "$", "parentObject", "->", ...
retrieve layouts to exclude from pageTSconfig @param int $container @param NewContentElementController $parentObject The parent object that triggered this hook @return array
[ "retrieve", "layouts", "to", "exclude", "from", "pageTSconfig" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Hooks/WizardItems.php#L191-L221
TYPO3-extensions/gridelements
Classes/Hooks/WizardItems.php
WizardItems.addGridItemsToWizard
public function addGridItemsToWizard(array &$gridItems, array &$wizardItems) { if (empty($gridItems)) { return; } // create gridelements node $wizardItems['gridelements'] = []; // set header label $wizardItems['gridelements']['header'] = $this->getLanguag...
php
public function addGridItemsToWizard(array &$gridItems, array &$wizardItems) { if (empty($gridItems)) { return; } // create gridelements node $wizardItems['gridelements'] = []; // set header label $wizardItems['gridelements']['header'] = $this->getLanguag...
[ "public", "function", "addGridItemsToWizard", "(", "array", "&", "$", "gridItems", ",", "array", "&", "$", "wizardItems", ")", "{", "if", "(", "empty", "(", "$", "gridItems", ")", ")", "{", "return", ";", "}", "// create gridelements node", "$", "wizardItems...
add gridelements to wizard items @param array $gridItems @param array $wizardItems
[ "add", "gridelements", "to", "wizard", "items" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Hooks/WizardItems.php#L229-L338
TYPO3-extensions/gridelements
Classes/Hooks/WizardItems.php
WizardItems.addGridValuesToWizardItems
public function addGridValuesToWizardItems(array &$wizardItems, $container, $column) { foreach ($wizardItems as $key => $wizardItem) { if (!$wizardItems[$key]['header']) { if ($container !== 0) { $wizardItems[$key]['tt_content_defValues']['tx_gridelements_cont...
php
public function addGridValuesToWizardItems(array &$wizardItems, $container, $column) { foreach ($wizardItems as $key => $wizardItem) { if (!$wizardItems[$key]['header']) { if ($container !== 0) { $wizardItems[$key]['tt_content_defValues']['tx_gridelements_cont...
[ "public", "function", "addGridValuesToWizardItems", "(", "array", "&", "$", "wizardItems", ",", "$", "container", ",", "$", "column", ")", "{", "foreach", "(", "$", "wizardItems", "as", "$", "key", "=>", "$", "wizardItem", ")", "{", "if", "(", "!", "$", ...
initializes wizard items @param array $wizardItems @param int $container @param int $column
[ "initializes", "wizard", "items" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Hooks/WizardItems.php#L355-L367
TYPO3-extensions/gridelements
Classes/Hooks/WizardItems.php
WizardItems.removeEmptyHeadersFromWizard
public function removeEmptyHeadersFromWizard(array &$wizardItems) { $headersWithElements = []; foreach ($wizardItems as $key => $wizardItem) { $isElement = strpos($key, '_', 1); if ($isElement) { $headersWithElements[substr($key, 0, $isElement)] = true; ...
php
public function removeEmptyHeadersFromWizard(array &$wizardItems) { $headersWithElements = []; foreach ($wizardItems as $key => $wizardItem) { $isElement = strpos($key, '_', 1); if ($isElement) { $headersWithElements[substr($key, 0, $isElement)] = true; ...
[ "public", "function", "removeEmptyHeadersFromWizard", "(", "array", "&", "$", "wizardItems", ")", "{", "$", "headersWithElements", "=", "[", "]", ";", "foreach", "(", "$", "wizardItems", "as", "$", "key", "=>", "$", "wizardItem", ")", "{", "$", "isElement", ...
remove unnecessary headers from wizard items @param array $wizardItems
[ "remove", "unnecessary", "headers", "from", "wizard", "items" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/Hooks/WizardItems.php#L374-L390
TYPO3-extensions/gridelements
Classes/DataHandler/AfterDatabaseOperations.php
AfterDatabaseOperations.adjustValuesAfterWorkspaceOperations
public function adjustValuesAfterWorkspaceOperations(array $fieldArray, $uid, DataHandler $parentObj) { $workspace = $this->getBackendUser()->workspace; if ($workspace && (isset($fieldArray['colPos']) || isset($fieldArray['tx_gridelements_container']) || isset($fieldArray['tx_gridelements_columns'])...
php
public function adjustValuesAfterWorkspaceOperations(array $fieldArray, $uid, DataHandler $parentObj) { $workspace = $this->getBackendUser()->workspace; if ($workspace && (isset($fieldArray['colPos']) || isset($fieldArray['tx_gridelements_container']) || isset($fieldArray['tx_gridelements_columns'])...
[ "public", "function", "adjustValuesAfterWorkspaceOperations", "(", "array", "$", "fieldArray", ",", "$", "uid", ",", "DataHandler", "$", "parentObj", ")", "{", "$", "workspace", "=", "$", "this", "->", "getBackendUser", "(", ")", "->", "workspace", ";", "if", ...
Function to adjust colPos, container and grid column of an element after it has been moved out of or into a container during a workspace operation @param array $fieldArray The array of fields and values that have been saved to the datamap @param int $uid the ID of the record @param DataHandler $parentObj The parent ob...
[ "Function", "to", "adjust", "colPos", "container", "and", "grid", "column", "of", "an", "element", "after", "it", "has", "been", "moved", "out", "of", "or", "into", "a", "container", "during", "a", "workspace", "operation" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AfterDatabaseOperations.php#L44-L64
TYPO3-extensions/gridelements
Classes/DataHandler/AfterDatabaseOperations.php
AfterDatabaseOperations.execute_afterDatabaseOperations
public function execute_afterDatabaseOperations(array &$fieldArray, $table, $uid, DataHandler $parentObj) { if ($table === 'tt_content' || $table === 'pages') { $this->init($table, $uid, $parentObj); if (!$this->getTceMain()->isImporting) { $this->saveCleanedUpFieldAr...
php
public function execute_afterDatabaseOperations(array &$fieldArray, $table, $uid, DataHandler $parentObj) { if ($table === 'tt_content' || $table === 'pages') { $this->init($table, $uid, $parentObj); if (!$this->getTceMain()->isImporting) { $this->saveCleanedUpFieldAr...
[ "public", "function", "execute_afterDatabaseOperations", "(", "array", "&", "$", "fieldArray", ",", "$", "table", ",", "$", "uid", ",", "DataHandler", "$", "parentObj", ")", "{", "if", "(", "$", "table", "===", "'tt_content'", "||", "$", "table", "===", "'...
Function to set the colPos of an element depending on whether it is a child of a parent container or not will set colPos according to availability of the current grid column of an element 0 = no column at all -1 = grid element column -2 = non used elements column changes are applied to the field array of the parent obj...
[ "Function", "to", "set", "the", "colPos", "of", "an", "element", "depending", "on", "whether", "it", "is", "a", "child", "of", "a", "parent", "container", "or", "not", "will", "set", "colPos", "according", "to", "availability", "of", "the", "current", "gri...
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AfterDatabaseOperations.php#L90-L101
TYPO3-extensions/gridelements
Classes/DataHandler/AfterDatabaseOperations.php
AfterDatabaseOperations.saveCleanedUpFieldArray
public function saveCleanedUpFieldArray(array $changedFieldArray) { unset($changedFieldArray['pi_flexform']); if (isset($changedFieldArray['tx_gridelements_backend_layout']) && $this->getTable() === 'tt_content' || isset($changedFieldArray['backend_layout']) && $this->getTable() === 'pag...
php
public function saveCleanedUpFieldArray(array $changedFieldArray) { unset($changedFieldArray['pi_flexform']); if (isset($changedFieldArray['tx_gridelements_backend_layout']) && $this->getTable() === 'tt_content' || isset($changedFieldArray['backend_layout']) && $this->getTable() === 'pag...
[ "public", "function", "saveCleanedUpFieldArray", "(", "array", "$", "changedFieldArray", ")", "{", "unset", "(", "$", "changedFieldArray", "[", "'pi_flexform'", "]", ")", ";", "if", "(", "isset", "(", "$", "changedFieldArray", "[", "'tx_gridelements_backend_layout'"...
save cleaned up field array @param array $changedFieldArray
[ "save", "cleaned", "up", "field", "array" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AfterDatabaseOperations.php#L108-L117
TYPO3-extensions/gridelements
Classes/DataHandler/AfterDatabaseOperations.php
AfterDatabaseOperations.setUnusedElements
public function setUnusedElements(array &$fieldArray) { $changedGridElements = []; $changedElements = []; $changedSubPageElements = []; if ($this->getTable() === 'tt_content') { $changedGridElements[$this->getContentUid()] = true; $childElementsInUnavailableC...
php
public function setUnusedElements(array &$fieldArray) { $changedGridElements = []; $changedElements = []; $changedSubPageElements = []; if ($this->getTable() === 'tt_content') { $changedGridElements[$this->getContentUid()] = true; $childElementsInUnavailableC...
[ "public", "function", "setUnusedElements", "(", "array", "&", "$", "fieldArray", ")", "{", "$", "changedGridElements", "=", "[", "]", ";", "$", "changedElements", "=", "[", "]", ";", "$", "changedSubPageElements", "=", "[", "]", ";", "if", "(", "$", "thi...
Function to move elements to/from the unused elements column while changing the layout of a page or a grid element @param array $fieldArray The array of fields and values that have been saved to the datamap
[ "Function", "to", "move", "elements", "to", "/", "from", "the", "unused", "elements", "column", "while", "changing", "the", "layout", "of", "a", "page", "or", "a", "grid", "element" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AfterDatabaseOperations.php#L124-L451
TYPO3-extensions/gridelements
Classes/DataHandler/AfterDatabaseOperations.php
AfterDatabaseOperations.getAvailableColumns
public function getAvailableColumns($layout = '', $table = '', $id = 0) { $tcaColumns = ''; if ($layout && $table === 'tt_content') { $tcaColumns = $this->layoutSetup->getLayoutColumns($layout); $tcaColumns = '-2,-1,' . $tcaColumns['CSV']; } elseif ($table === 'pages...
php
public function getAvailableColumns($layout = '', $table = '', $id = 0) { $tcaColumns = ''; if ($layout && $table === 'tt_content') { $tcaColumns = $this->layoutSetup->getLayoutColumns($layout); $tcaColumns = '-2,-1,' . $tcaColumns['CSV']; } elseif ($table === 'pages...
[ "public", "function", "getAvailableColumns", "(", "$", "layout", "=", "''", ",", "$", "table", "=", "''", ",", "$", "id", "=", "0", ")", "{", "$", "tcaColumns", "=", "''", ";", "if", "(", "$", "layout", "&&", "$", "table", "===", "'tt_content'", ")...
fetches all available columns for a certain grid container based on TCA settings and layout records @param string $layout The selected backend layout of the grid container or the page @param string $table The name of the table to get the layout for @param int $id he uid of the parent container - being the page id for ...
[ "fetches", "all", "available", "columns", "for", "a", "certain", "grid", "container", "based", "on", "TCA", "settings", "and", "layout", "records" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AfterDatabaseOperations.php#L462-L485
TYPO3-extensions/gridelements
Classes/DataHandler/AfterDatabaseOperations.php
AfterDatabaseOperations.getSubPagesRecursively
public function getSubPagesRecursively($pageUid, array &$subPages) { $queryBuilder = $this->getQueryBuilder('pages'); $childPages = $queryBuilder ->select('uid', 'backend_layout', 'backend_layout_next_level') ->from('pages') ->where( $queryBuilder-...
php
public function getSubPagesRecursively($pageUid, array &$subPages) { $queryBuilder = $this->getQueryBuilder('pages'); $childPages = $queryBuilder ->select('uid', 'backend_layout', 'backend_layout_next_level') ->from('pages') ->where( $queryBuilder-...
[ "public", "function", "getSubPagesRecursively", "(", "$", "pageUid", ",", "array", "&", "$", "subPages", ")", "{", "$", "queryBuilder", "=", "$", "this", "->", "getQueryBuilder", "(", "'pages'", ")", ";", "$", "childPages", "=", "$", "queryBuilder", "->", ...
gets all subpages of the current page and traverses recursively unless backend_layout_next_level is set or unset (!= 0) @param int $pageUid @param array $subPages
[ "gets", "all", "subpages", "of", "the", "current", "page", "and", "traverses", "recursively", "unless", "backend_layout_next_level", "is", "set", "or", "unset", "(", "!", "=", "0", ")" ]
train
https://github.com/TYPO3-extensions/gridelements/blob/50a1ee6965445938726ca33c423d30a29adaf0a6/Classes/DataHandler/AfterDatabaseOperations.php#L493-L518
felixfbecker/php-advanced-json-rpc
lib/Request.php
Request.isRequest
public static function isRequest($msg): bool { return is_object($msg) && property_exists($msg, 'id') && isset($msg->method); }
php
public static function isRequest($msg): bool { return is_object($msg) && property_exists($msg, 'id') && isset($msg->method); }
[ "public", "static", "function", "isRequest", "(", "$", "msg", ")", ":", "bool", "{", "return", "is_object", "(", "$", "msg", ")", "&&", "property_exists", "(", "$", "msg", ",", "'id'", ")", "&&", "isset", "(", "$", "msg", "->", "method", ")", ";", ...
A message is considered a Request if it has an ID and a method. @param object $msg A decoded message body @return bool
[ "A", "message", "is", "considered", "a", "Request", "if", "it", "has", "an", "ID", "and", "a", "method", "." ]
train
https://github.com/felixfbecker/php-advanced-json-rpc/blob/aaaf9b6088b9149ece1bf0e5f690976506bbdadf/lib/Request.php#L47-L50
felixfbecker/php-advanced-json-rpc
lib/Message.php
Message.parse
public static function parse(string $msg): Message { $decoded = json_decode($msg); if (json_last_error() !== JSON_ERROR_NONE) { throw new Error(json_last_error_msg(), ErrorCode::PARSE_ERROR); } if (Notification::isNotification($decoded)) { $obj = new Notificat...
php
public static function parse(string $msg): Message { $decoded = json_decode($msg); if (json_last_error() !== JSON_ERROR_NONE) { throw new Error(json_last_error_msg(), ErrorCode::PARSE_ERROR); } if (Notification::isNotification($decoded)) { $obj = new Notificat...
[ "public", "static", "function", "parse", "(", "string", "$", "msg", ")", ":", "Message", "{", "$", "decoded", "=", "json_decode", "(", "$", "msg", ")", ";", "if", "(", "json_last_error", "(", ")", "!==", "JSON_ERROR_NONE", ")", "{", "throw", "new", "Er...
Returns the appropriate Message subclass @param string $msg @return Message
[ "Returns", "the", "appropriate", "Message", "subclass" ]
train
https://github.com/felixfbecker/php-advanced-json-rpc/blob/aaaf9b6088b9149ece1bf0e5f690976506bbdadf/lib/Message.php#L24-L42
felixfbecker/php-advanced-json-rpc
lib/ErrorResponse.php
ErrorResponse.isErrorResponse
public static function isErrorResponse($msg): bool { return is_object($msg) && isset($msg->id) && isset($msg->error); }
php
public static function isErrorResponse($msg): bool { return is_object($msg) && isset($msg->id) && isset($msg->error); }
[ "public", "static", "function", "isErrorResponse", "(", "$", "msg", ")", ":", "bool", "{", "return", "is_object", "(", "$", "msg", ")", "&&", "isset", "(", "$", "msg", "->", "id", ")", "&&", "isset", "(", "$", "msg", "->", "error", ")", ";", "}" ]
A message is considered a Response if it has an ID and either a result or an error @param object $msg A decoded message body @return bool
[ "A", "message", "is", "considered", "a", "Response", "if", "it", "has", "an", "ID", "and", "either", "a", "result", "or", "an", "error" ]
train
https://github.com/felixfbecker/php-advanced-json-rpc/blob/aaaf9b6088b9149ece1bf0e5f690976506bbdadf/lib/ErrorResponse.php#L26-L29
felixfbecker/php-advanced-json-rpc
lib/Dispatcher.php
Dispatcher.dispatch
public function dispatch($msg) { if (is_string($msg)) { $msg = json_decode($msg); if (json_last_error() !== JSON_ERROR_NONE) { throw new Error(json_last_error_msg(), ErrorCode::PARSE_ERROR); } } // Find out the object and function that shou...
php
public function dispatch($msg) { if (is_string($msg)) { $msg = json_decode($msg); if (json_last_error() !== JSON_ERROR_NONE) { throw new Error(json_last_error_msg(), ErrorCode::PARSE_ERROR); } } // Find out the object and function that shou...
[ "public", "function", "dispatch", "(", "$", "msg", ")", "{", "if", "(", "is_string", "(", "$", "msg", ")", ")", "{", "$", "msg", "=", "json_decode", "(", "$", "msg", ")", ";", "if", "(", "json_last_error", "(", ")", "!==", "JSON_ERROR_NONE", ")", "...
Calls the appropriate method handler for an incoming Message @param string|object $msg The incoming message @return Result|void
[ "Calls", "the", "appropriate", "method", "handler", "for", "an", "incoming", "Message" ]
train
https://github.com/felixfbecker/php-advanced-json-rpc/blob/aaaf9b6088b9149ece1bf0e5f690976506bbdadf/lib/Dispatcher.php#L62-L162
felixfbecker/php-advanced-json-rpc
lib/Notification.php
Notification.isNotification
public static function isNotification($msg): bool { return is_object($msg) && !property_exists($msg, 'id') && isset($msg->method); }
php
public static function isNotification($msg): bool { return is_object($msg) && !property_exists($msg, 'id') && isset($msg->method); }
[ "public", "static", "function", "isNotification", "(", "$", "msg", ")", ":", "bool", "{", "return", "is_object", "(", "$", "msg", ")", "&&", "!", "property_exists", "(", "$", "msg", ",", "'id'", ")", "&&", "isset", "(", "$", "msg", "->", "method", ")...
A message is considered a Notification if it has a method but no ID. @param object $msg A decoded message body @return bool
[ "A", "message", "is", "considered", "a", "Notification", "if", "it", "has", "a", "method", "but", "no", "ID", "." ]
train
https://github.com/felixfbecker/php-advanced-json-rpc/blob/aaaf9b6088b9149ece1bf0e5f690976506bbdadf/lib/Notification.php#L42-L45
felixfbecker/php-advanced-json-rpc
lib/Response.php
Response.isResponse
public static function isResponse($msg): bool { return is_object($msg) && property_exists($msg, 'id') && (property_exists($msg, 'result') || isset($msg->error)); }
php
public static function isResponse($msg): bool { return is_object($msg) && property_exists($msg, 'id') && (property_exists($msg, 'result') || isset($msg->error)); }
[ "public", "static", "function", "isResponse", "(", "$", "msg", ")", ":", "bool", "{", "return", "is_object", "(", "$", "msg", ")", "&&", "property_exists", "(", "$", "msg", ",", "'id'", ")", "&&", "(", "property_exists", "(", "$", "msg", ",", "'result'...
A message is considered a Response if it has an ID and either a result or an error @param object $msg A decoded message body @return bool
[ "A", "message", "is", "considered", "a", "Response", "if", "it", "has", "an", "ID", "and", "either", "a", "result", "or", "an", "error" ]
train
https://github.com/felixfbecker/php-advanced-json-rpc/blob/aaaf9b6088b9149ece1bf0e5f690976506bbdadf/lib/Response.php#L26-L29
codacy/php-codacy-coverage
src/Codacy/Coverage/Command/Clover.php
Clover.getParser
protected function getParser($path = null) { $path = is_null($path) ? join(DIRECTORY_SEPARATOR, array('build', 'logs', 'clover.xml')) : $path; return new CloverParser($path); }
php
protected function getParser($path = null) { $path = is_null($path) ? join(DIRECTORY_SEPARATOR, array('build', 'logs', 'clover.xml')) : $path; return new CloverParser($path); }
[ "protected", "function", "getParser", "(", "$", "path", "=", "null", ")", "{", "$", "path", "=", "is_null", "(", "$", "path", ")", "?", "join", "(", "DIRECTORY_SEPARATOR", ",", "array", "(", "'build'", ",", "'logs'", ",", "'clover.xml'", ")", ")", ":",...
Get parser of current format type. @param string $path Path to clover.xml @return CloverParser
[ "Get", "parser", "of", "current", "format", "type", "." ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Command/Clover.php#L82-L88
codacy/php-codacy-coverage
src/Codacy/Coverage/Command/Clover.php
Clover.getCommitHash
protected function getCommitHash($hash = null) { if (!$hash) { $gClient = new GitClient(getcwd()); return $gClient->getHashOfLatestCommit(); } if (strlen($hash) != 40) { throw new \InvalidArgumentException( sprintf("Invalid git commit hash...
php
protected function getCommitHash($hash = null) { if (!$hash) { $gClient = new GitClient(getcwd()); return $gClient->getHashOfLatestCommit(); } if (strlen($hash) != 40) { throw new \InvalidArgumentException( sprintf("Invalid git commit hash...
[ "protected", "function", "getCommitHash", "(", "$", "hash", "=", "null", ")", "{", "if", "(", "!", "$", "hash", ")", "{", "$", "gClient", "=", "new", "GitClient", "(", "getcwd", "(", ")", ")", ";", "return", "$", "gClient", "->", "getHashOfLatestCommit...
Get Git commit hash of project @param string $hash Specified hash @return string Git commit hash @throws \InvalidArgumentException When bad hash specified, or can't get commit hash
[ "Get", "Git", "commit", "hash", "of", "project" ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Command/Clover.php#L119-L133
codacy/php-codacy-coverage
src/Codacy/Coverage/Parser/CloverParser.php
CloverParser.makeReport
public function makeReport() { $project = $this->element->project; $projectMetrics = $project->metrics; $coveredStatements = intval($projectMetrics['coveredstatements']); $statementsTotal = intval($projectMetrics['statements']); $reportTotal = round($this->safeDivision($cover...
php
public function makeReport() { $project = $this->element->project; $projectMetrics = $project->metrics; $coveredStatements = intval($projectMetrics['coveredstatements']); $statementsTotal = intval($projectMetrics['statements']); $reportTotal = round($this->safeDivision($cover...
[ "public", "function", "makeReport", "(", ")", "{", "$", "project", "=", "$", "this", "->", "element", "->", "project", ";", "$", "projectMetrics", "=", "$", "project", "->", "metrics", ";", "$", "coveredStatements", "=", "intval", "(", "$", "projectMetrics...
Extracts basic information about coverage report and delegates more detailed extraction work to _makeFileReports() method. @return CoverageReport $report The CoverageReport object
[ "Extracts", "basic", "information", "about", "coverage", "report", "and", "delegates", "more", "detailed", "extraction", "work", "to", "_makeFileReports", "()", "method", "." ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Parser/CloverParser.php#L22-L32
codacy/php-codacy-coverage
src/Codacy/Coverage/Parser/CloverParser.php
CloverParser.makeFileReports
private function makeFileReports(\SimpleXMLElement $node) { $fileReports = array(); /* * Most clover reports will have project/package/file/line xPath. * But there could be files that are not part of any package, i.e files that * that do not declare namespace. */ ...
php
private function makeFileReports(\SimpleXMLElement $node) { $fileReports = array(); /* * Most clover reports will have project/package/file/line xPath. * But there could be files that are not part of any package, i.e files that * that do not declare namespace. */ ...
[ "private", "function", "makeFileReports", "(", "\\", "SimpleXMLElement", "$", "node", ")", "{", "$", "fileReports", "=", "array", "(", ")", ";", "/*\n * Most clover reports will have project/package/file/line xPath.\n * But there could be files that are not part of an...
Takes the root \SimpleXMLElement object of the parsed file and decides on how to iterate it to extract information of all <file...>..</file> nodes. @param \SimpleXMLElement $node the root XML node. @return array holding FileReport objects
[ "Takes", "the", "root", "\\", "SimpleXMLElement", "object", "of", "the", "parsed", "file", "and", "decides", "on", "how", "to", "iterate", "it", "to", "extract", "information", "of", "all", "<file", "...", ">", "..", "<", "/", "file", ">", "nodes", "." ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Parser/CloverParser.php#L41-L57
codacy/php-codacy-coverage
src/Codacy/Coverage/Parser/CloverParser.php
CloverParser.makeFileReportsFromFiles
private function makeFileReportsFromFiles(\SimpleXMLElement $node, $fileReports) { foreach ($node as $file) { // iterate files in the package $countStatement = intval($file->metrics['statements']); $countCoveredStatements = intval($file->metrics['coveredstatements']); ...
php
private function makeFileReportsFromFiles(\SimpleXMLElement $node, $fileReports) { foreach ($node as $file) { // iterate files in the package $countStatement = intval($file->metrics['statements']); $countCoveredStatements = intval($file->metrics['coveredstatements']); ...
[ "private", "function", "makeFileReportsFromFiles", "(", "\\", "SimpleXMLElement", "$", "node", ",", "$", "fileReports", ")", "{", "foreach", "(", "$", "node", "as", "$", "file", ")", "{", "// iterate files in the package", "$", "countStatement", "=", "intval", "...
Iterates all over all <file...>..</file> nodes. @param \SimpleXMLElement $node The XML node holding the file nodes. @param array $fileReports array of FileReport objects @return array holding FileReport objects
[ "Iterates", "all", "over", "all", "<file", "...", ">", "..", "<", "/", "file", ">", "nodes", "." ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Parser/CloverParser.php#L65-L82
codacy/php-codacy-coverage
src/Codacy/Coverage/Parser/CloverParser.php
CloverParser.makeFileReportsFromPackages
private function makeFileReportsFromPackages(\SimpleXMLElement $node, $fileReports) { // iterate all packages foreach ($node as $package) { $fileReports = $this->makeFileReportsFromFiles($package->file, $fileReports); } return $fileReports; }
php
private function makeFileReportsFromPackages(\SimpleXMLElement $node, $fileReports) { // iterate all packages foreach ($node as $package) { $fileReports = $this->makeFileReportsFromFiles($package->file, $fileReports); } return $fileReports; }
[ "private", "function", "makeFileReportsFromPackages", "(", "\\", "SimpleXMLElement", "$", "node", ",", "$", "fileReports", ")", "{", "// iterate all packages", "foreach", "(", "$", "node", "as", "$", "package", ")", "{", "$", "fileReports", "=", "$", "this", "...
Iterates over all <package..>...</package> nodes and calls _makeFileReportsFromFiles on them @param \SimpleXMLElement $node The XML node holding all <package..>...</package> nodes @param array $fileReports array of FileReport objects @return array holding FileReport objects
[ "Iterates", "over", "all", "<package", "..", ">", "...", "<", "/", "package", ">", "nodes", "and", "calls", "_makeFileReportsFromFiles", "on", "them" ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Parser/CloverParser.php#L90-L97
codacy/php-codacy-coverage
src/Codacy/Coverage/Parser/CloverParser.php
CloverParser.getLineCoverage
private function getLineCoverage(\SimpleXMLElement $node) { $lineCoverage = (object)array(); foreach ($node as $line) { $count = intval($line['count']); // iterate all lines in that file if ($line['type'] == 'stmt') { $lineNr = (string)$line['num']...
php
private function getLineCoverage(\SimpleXMLElement $node) { $lineCoverage = (object)array(); foreach ($node as $line) { $count = intval($line['count']); // iterate all lines in that file if ($line['type'] == 'stmt') { $lineNr = (string)$line['num']...
[ "private", "function", "getLineCoverage", "(", "\\", "SimpleXMLElement", "$", "node", ")", "{", "$", "lineCoverage", "=", "(", "object", ")", "array", "(", ")", ";", "foreach", "(", "$", "node", "as", "$", "line", ")", "{", "$", "count", "=", "intval",...
Iterates all <line></line> nodes and produces an array holding line coverage information. Only adds lines of type "stmt" and with count greater than 0. @param \SimpleXMLElement $node The XML node holding the <line></line> nodes @return array: (lineNumber -> hits)
[ "Iterates", "all", "<line", ">", "<", "/", "line", ">", "nodes", "and", "produces", "an", "array", "holding", "line", "coverage", "information", ".", "Only", "adds", "lines", "of", "type", "stmt", "and", "with", "count", "greater", "than", "0", "." ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Parser/CloverParser.php#L105-L118
codacy/php-codacy-coverage
src/Codacy/Coverage/Parser/CloverParser.php
CloverParser.getRelativePath
private function getRelativePath(\SimpleXMLElement $fileName) { $prefix = $this->rootDir . DIRECTORY_SEPARATOR; $str = (string)$fileName; if (substr($str, 0, strlen($prefix)) == $prefix) { $str = substr($str, strlen($prefix)); } return $str; }
php
private function getRelativePath(\SimpleXMLElement $fileName) { $prefix = $this->rootDir . DIRECTORY_SEPARATOR; $str = (string)$fileName; if (substr($str, 0, strlen($prefix)) == $prefix) { $str = substr($str, strlen($prefix)); } return $str; }
[ "private", "function", "getRelativePath", "(", "\\", "SimpleXMLElement", "$", "fileName", ")", "{", "$", "prefix", "=", "$", "this", "->", "rootDir", ".", "DIRECTORY_SEPARATOR", ";", "$", "str", "=", "(", "string", ")", "$", "fileName", ";", "if", "(", "...
Cuts the file name so we have relative path to projectRoot. In a clover file file names are saved from / on. We are only interested in relative filename @param \SimpleXMLElement $fileName The filename attribute @return string The relative path of that file
[ "Cuts", "the", "file", "name", "so", "we", "have", "relative", "path", "to", "projectRoot", ".", "In", "a", "clover", "file", "file", "names", "are", "saved", "from", "/", "on", ".", "We", "are", "only", "interested", "in", "relative", "filename" ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Parser/CloverParser.php#L127-L137
codacy/php-codacy-coverage
src/Codacy/Coverage/Parser/PhpUnitXmlParser.php
PhpUnitXmlParser.getLineCoverage
private function getLineCoverage(\SimpleXMLElement $node) { $lineCoverage = (object)array(); if ($node->file->coverage) { foreach ($node->file->coverage->line as $line) { $count = $line->covered->count(); $nr = (string)$line["nr"]; $lineCov...
php
private function getLineCoverage(\SimpleXMLElement $node) { $lineCoverage = (object)array(); if ($node->file->coverage) { foreach ($node->file->coverage->line as $line) { $count = $line->covered->count(); $nr = (string)$line["nr"]; $lineCov...
[ "private", "function", "getLineCoverage", "(", "\\", "SimpleXMLElement", "$", "node", ")", "{", "$", "lineCoverage", "=", "(", "object", ")", "array", "(", ")", ";", "if", "(", "$", "node", "->", "file", "->", "coverage", ")", "{", "foreach", "(", "$",...
Iterates all <line></line> nodes and produces an array holding line coverage information. @param \SimpleXMLElement $node The XML node holding the <line></line> nodes @return array: (lineNumber -> hits)
[ "Iterates", "all", "<line", ">", "<", "/", "line", ">", "nodes", "and", "produces", "an", "array", "holding", "line", "coverage", "information", "." ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Parser/PhpUnitXmlParser.php#L79-L90
codacy/php-codacy-coverage
src/Codacy/Coverage/Parser/PhpUnitXmlParser.php
PhpUnitXmlParser.getTotalFromPercent
private function getTotalFromPercent(\SimpleXMLElement $percent) { $percent = (string)$percent; $percent = substr($percent, 0, -1); return round($percent); }
php
private function getTotalFromPercent(\SimpleXMLElement $percent) { $percent = (string)$percent; $percent = substr($percent, 0, -1); return round($percent); }
[ "private", "function", "getTotalFromPercent", "(", "\\", "SimpleXMLElement", "$", "percent", ")", "{", "$", "percent", "=", "(", "string", ")", "$", "percent", ";", "$", "percent", "=", "substr", "(", "$", "percent", ",", "0", ",", "-", "1", ")", ";", ...
Gets Integer from percent. Example: 95.00% -> 95 @param \SimpleXMLElement $percent The percent attribute of the node @return integer The according integer value
[ "Gets", "Integer", "from", "percent", ".", "Example", ":", "95", ".", "00%", "-", ">", "95" ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Parser/PhpUnitXmlParser.php#L97-L102
codacy/php-codacy-coverage
src/Codacy/Coverage/Parser/PhpUnitXmlParser.php
PhpUnitXmlParser.getRelativePath
private function getRelativePath(\SimpleXMLElement $fileName) { $dirOfSrcFiles = $this->element->project->directory["name"]; $projectRoot = $this->rootDir; // Need to cut off everything lower than projectRoot $dirFromProjectRoot = substr($dirOfSrcFiles, strlen($projectRoot) + 1); ...
php
private function getRelativePath(\SimpleXMLElement $fileName) { $dirOfSrcFiles = $this->element->project->directory["name"]; $projectRoot = $this->rootDir; // Need to cut off everything lower than projectRoot $dirFromProjectRoot = substr($dirOfSrcFiles, strlen($projectRoot) + 1); ...
[ "private", "function", "getRelativePath", "(", "\\", "SimpleXMLElement", "$", "fileName", ")", "{", "$", "dirOfSrcFiles", "=", "$", "this", "->", "element", "->", "project", "->", "directory", "[", "\"name\"", "]", ";", "$", "projectRoot", "=", "$", "this", ...
The PhpUnit XML Coverage format does not save the full path of the filename We can get the filename by combining the path of the first directory with the href attribute of each file. @param \SimpleXMLElement $fileName The href attribute of the <file></file> node. @return string The relative path of the file, that is, r...
[ "The", "PhpUnit", "XML", "Coverage", "format", "does", "not", "save", "the", "full", "path", "of", "the", "filename", "We", "can", "get", "the", "filename", "by", "combining", "the", "path", "of", "the", "first", "directory", "with", "the", "href", "attrib...
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Parser/PhpUnitXmlParser.php#L111-L120
codacy/php-codacy-coverage
src/Codacy/Coverage/Util/CodacyApiClient.php
CodacyApiClient.sendCoverage
public function sendCoverage($commit, $data) { $tempCertFile = $this->dumpCertificateBundle(); $url = $this->baseUrl . "/2.0/coverage/" . $commit . "/php"; $curl = curl_init($url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);...
php
public function sendCoverage($commit, $data) { $tempCertFile = $this->dumpCertificateBundle(); $url = $this->baseUrl . "/2.0/coverage/" . $commit . "/php"; $curl = curl_init($url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);...
[ "public", "function", "sendCoverage", "(", "$", "commit", ",", "$", "data", ")", "{", "$", "tempCertFile", "=", "$", "this", "->", "dumpCertificateBundle", "(", ")", ";", "$", "url", "=", "$", "this", "->", "baseUrl", ".", "\"/2.0/coverage/\"", ".", "$",...
@param string $commit commit uuid @param string $data the JSON data @return string success message @throws \Exception when remote server response
[ "@param", "string", "$commit", "commit", "uuid", "@param", "string", "$data", "the", "JSON", "data" ]
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Util/CodacyApiClient.php#L26-L70
codacy/php-codacy-coverage
src/Codacy/Coverage/Util/JsonProducer.php
JsonProducer.makeJson
public function makeJson() { $report = $this->makeReport(); $array = array(); $array['total'] = $report->getTotal(); $fileReportsArray = array(); $fileReports = $report->getFileReports(); foreach ($fileReports as $fr) { $fileArray = array(); ...
php
public function makeJson() { $report = $this->makeReport(); $array = array(); $array['total'] = $report->getTotal(); $fileReportsArray = array(); $fileReports = $report->getFileReports(); foreach ($fileReports as $fr) { $fileArray = array(); ...
[ "public", "function", "makeJson", "(", ")", "{", "$", "report", "=", "$", "this", "->", "makeReport", "(", ")", ";", "$", "array", "=", "array", "(", ")", ";", "$", "array", "[", "'total'", "]", "=", "$", "report", "->", "getTotal", "(", ")", ";"...
Takes a CoverageReport object, the result of makeReport(), and outputs JSON. Example JSON format: { "total": 67, "fileReports": [ { "filename": "src/Codacy/Coverage/Api/Api.php", "total": 3, "coverage": { "12": 3, "13": 5, ......... ......... } }, ......... ....... ] } @return string the JSON string
[ "Takes", "a", "CoverageReport", "object", "the", "result", "of", "makeReport", "()", "and", "outputs", "JSON", ".", "Example", "JSON", "format", ":", "{", "total", ":", "67", "fileReports", ":", "[", "{", "filename", ":", "src", "/", "Codacy", "/", "Cove...
train
https://github.com/codacy/php-codacy-coverage/blob/629d1fd597f91fb072bd822830059fd5145ce49a/src/Codacy/Coverage/Util/JsonProducer.php#L60-L86
oat-sa/extension-tao-delivery-rdf
view/form/DeliveryForm.php
DeliveryForm.setThemeNameSelectorOptions
protected function setThemeNameSelectorOptions() { $elementUri = tao_helpers_Uri::encode(DeliveryThemeDetailsProvider::DELIVERY_THEME_ID_URI); if (!$this->form->hasElement($elementUri)) { return false; } /** @var ThemeService $themeService */ $themeService = Serv...
php
protected function setThemeNameSelectorOptions() { $elementUri = tao_helpers_Uri::encode(DeliveryThemeDetailsProvider::DELIVERY_THEME_ID_URI); if (!$this->form->hasElement($elementUri)) { return false; } /** @var ThemeService $themeService */ $themeService = Serv...
[ "protected", "function", "setThemeNameSelectorOptions", "(", ")", "{", "$", "elementUri", "=", "tao_helpers_Uri", "::", "encode", "(", "DeliveryThemeDetailsProvider", "::", "DELIVERY_THEME_ID_URI", ")", ";", "if", "(", "!", "$", "this", "->", "form", "->", "hasEle...
Sets the theme name selector options. @return bool
[ "Sets", "the", "theme", "name", "selector", "options", "." ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/view/form/DeliveryForm.php#L91-L112
oat-sa/extension-tao-delivery-rdf
scripts/tools/jMeterCleaner.php
jMeterCleaner.usage
private function usage() { if (empty($this->params)) { $usageHelper = \common_report_Report::createInfo('USAGE: What you could do here:'); $usageHelper->add(\common_report_Report::createSuccess('Please, Note that sections must not intersect otherwise it will work according to priorit...
php
private function usage() { if (empty($this->params)) { $usageHelper = \common_report_Report::createInfo('USAGE: What you could do here:'); $usageHelper->add(\common_report_Report::createSuccess('Please, Note that sections must not intersect otherwise it will work according to priorit...
[ "private", "function", "usage", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "params", ")", ")", "{", "$", "usageHelper", "=", "\\", "common_report_Report", "::", "createInfo", "(", "'USAGE: What you could do here:'", ")", ";", "$", "usageHelpe...
how it works
[ "how", "it", "works" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/scripts/tools/jMeterCleaner.php#L75-L109
oat-sa/extension-tao-delivery-rdf
scripts/tools/jMeterCleaner.php
jMeterCleaner.counter
private function counter() { if (!$this->done && in_array('--count-deliveries-by-user', $this->params)) { $this->done = true; $counterReport = \common_report_Report::createInfo('List of Users:'); $helper = new ConsoleTableHelper(); $helper->addHeader(['TestT...
php
private function counter() { if (!$this->done && in_array('--count-deliveries-by-user', $this->params)) { $this->done = true; $counterReport = \common_report_Report::createInfo('List of Users:'); $helper = new ConsoleTableHelper(); $helper->addHeader(['TestT...
[ "private", "function", "counter", "(", ")", "{", "if", "(", "!", "$", "this", "->", "done", "&&", "in_array", "(", "'--count-deliveries-by-user'", ",", "$", "this", "->", "params", ")", ")", "{", "$", "this", "->", "done", "=", "true", ";", "$", "cou...
First section with general information about users
[ "First", "section", "with", "general", "information", "about", "users" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/scripts/tools/jMeterCleaner.php#L123-L137
oat-sa/extension-tao-delivery-rdf
scripts/tools/jMeterCleaner.php
jMeterCleaner.detailed
private function detailed() { if (!$this->done && in_array('--detailed-report', $this->params)) { $this->done = true; $details = $this->getDetailsForUser(!in_array('--open-out', $this->params)); if ($details !== false) { $counterReport = \common_report_Rep...
php
private function detailed() { if (!$this->done && in_array('--detailed-report', $this->params)) { $this->done = true; $details = $this->getDetailsForUser(!in_array('--open-out', $this->params)); if ($details !== false) { $counterReport = \common_report_Rep...
[ "private", "function", "detailed", "(", ")", "{", "if", "(", "!", "$", "this", "->", "done", "&&", "in_array", "(", "'--detailed-report'", ",", "$", "this", "->", "params", ")", ")", "{", "$", "this", "->", "done", "=", "true", ";", "$", "details", ...
Second section with detailed information about the specified user
[ "Second", "section", "with", "detailed", "information", "about", "the", "specified", "user" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/scripts/tools/jMeterCleaner.php#L203-L217
oat-sa/extension-tao-delivery-rdf
scripts/tools/jMeterCleaner.php
jMeterCleaner.getResourceFromParameter
private function getResourceFromParameter($prefix = '--unique-prefix') { $resource = null; $hasParameter = false; $val = $this->getParameterValue($prefix); if ($val) { $hasParameter = true; $resource = $this->getResource($val); if (!$resource->exi...
php
private function getResourceFromParameter($prefix = '--unique-prefix') { $resource = null; $hasParameter = false; $val = $this->getParameterValue($prefix); if ($val) { $hasParameter = true; $resource = $this->getResource($val); if (!$resource->exi...
[ "private", "function", "getResourceFromParameter", "(", "$", "prefix", "=", "'--unique-prefix'", ")", "{", "$", "resource", "=", "null", ";", "$", "hasParameter", "=", "false", ";", "$", "val", "=", "$", "this", "->", "getParameterValue", "(", "$", "prefix",...
Get parameter from the list of parameters as Resource @param string $prefix @return bool|\core_kernel_classes_Resource
[ "Get", "parameter", "from", "the", "list", "of", "parameters", "as", "Resource" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/scripts/tools/jMeterCleaner.php#L224-L239
oat-sa/extension-tao-delivery-rdf
scripts/tools/jMeterCleaner.php
jMeterCleaner.cleaner
private function cleaner() { if (!$this->done && in_array('--run-cleaner', $this->params)) { $this->done = true; $testTaker = $this->getResourceFromParameter('--clean-user='); if (!$testTaker) { $this->report->add(\common_report_Report::createFailure('--c...
php
private function cleaner() { if (!$this->done && in_array('--run-cleaner', $this->params)) { $this->done = true; $testTaker = $this->getResourceFromParameter('--clean-user='); if (!$testTaker) { $this->report->add(\common_report_Report::createFailure('--c...
[ "private", "function", "cleaner", "(", ")", "{", "if", "(", "!", "$", "this", "->", "done", "&&", "in_array", "(", "'--run-cleaner'", ",", "$", "this", "->", "params", ")", ")", "{", "$", "this", "->", "done", "=", "true", ";", "$", "testTaker", "=...
The most dangerous of the sections which will affect on the stored data
[ "The", "most", "dangerous", "of", "the", "sections", "which", "will", "affect", "on", "the", "stored", "data" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/scripts/tools/jMeterCleaner.php#L281-L328
oat-sa/extension-tao-delivery-rdf
view/form/export/ExportForm.php
ExportForm.initElements
public function initElements() { $fileName = ''; $instances = array(); if (isset($this->data['instance'])){ $instance = $this->data['instance']; if ($instance instanceof \core_kernel_classes_Resource) { $instances[$instance->getUri()] = $instance->getLabel(); } } e...
php
public function initElements() { $fileName = ''; $instances = array(); if (isset($this->data['instance'])){ $instance = $this->data['instance']; if ($instance instanceof \core_kernel_classes_Resource) { $instances[$instance->getUri()] = $instance->getLabel(); } } e...
[ "public", "function", "initElements", "(", ")", "{", "$", "fileName", "=", "''", ";", "$", "instances", "=", "array", "(", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "data", "[", "'instance'", "]", ")", ")", "{", "$", "instance", "=", ...
(non-PHPdoc) @see tao_helpers_form_FormContainer::initElements()
[ "(", "non", "-", "PHPdoc", ")" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/view/form/export/ExportForm.php#L46-L83
oat-sa/extension-tao-delivery-rdf
view/form/WizardForm.php
WizardForm.initElements
public function initElements() { $class = $this->data['class']; if(!$class instanceof \core_kernel_classes_Class) { throw new \common_Exception('missing class in simple delivery creation form'); } $classUriElt = \tao_helpers_form_FormFactory::getElement('classUri...
php
public function initElements() { $class = $this->data['class']; if(!$class instanceof \core_kernel_classes_Class) { throw new \common_Exception('missing class in simple delivery creation form'); } $classUriElt = \tao_helpers_form_FormFactory::getElement('classUri...
[ "public", "function", "initElements", "(", ")", "{", "$", "class", "=", "$", "this", "->", "data", "[", "'class'", "]", ";", "if", "(", "!", "$", "class", "instanceof", "\\", "core_kernel_classes_Class", ")", "{", "throw", "new", "\\", "common_Exception", ...
/* Short description of method initElements @access public @author Joel Bout, <joel.bout@tudor.lu> @return mixed
[ "/", "*", "Short", "description", "of", "method", "initElements" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/view/form/WizardForm.php#L64-L97
oat-sa/extension-tao-delivery-rdf
controller/DeliveryMgmt.php
DeliveryMgmt.editDelivery
public function editDelivery() { $this->defaultData(); $class = $this->getCurrentClass(); $delivery = $this->getCurrentInstance(); //Removing Result Server form field if it is hardcoded in configuration //since property name (and possibly property itself) is deprecated then...
php
public function editDelivery() { $this->defaultData(); $class = $this->getCurrentClass(); $delivery = $this->getCurrentInstance(); //Removing Result Server form field if it is hardcoded in configuration //since property name (and possibly property itself) is deprecated then...
[ "public", "function", "editDelivery", "(", ")", "{", "$", "this", "->", "defaultData", "(", ")", ";", "$", "class", "=", "$", "this", "->", "getCurrentClass", "(", ")", ";", "$", "delivery", "=", "$", "this", "->", "getCurrentInstance", "(", ")", ";", ...
Edit a delivery instance @access public @author CRP Henri Tudor - TAO Team - {@link http://www.tao.lu} @return void @throws \common_exception_NoImplementation @throws \common_exception_Error @throws \oat\tao\model\security\SecurityException
[ "Edit", "a", "delivery", "instance" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/controller/DeliveryMgmt.php#L86-L164
oat-sa/extension-tao-delivery-rdf
scripts/tools/CleanFailedCompiledDeliveriesScript.php
CleanFailedCompiledDeliveriesScript.run
protected function run() { $report = common_report_Report::createInfo('Deleting Failing deliveries'); /** @var ComplexSearchService $search */ $search = $this->getModel()->getSearchInterface(); $deliveryAssemblyService = DeliveryAssemblyService::singleton(); $queryBuilder =...
php
protected function run() { $report = common_report_Report::createInfo('Deleting Failing deliveries'); /** @var ComplexSearchService $search */ $search = $this->getModel()->getSearchInterface(); $deliveryAssemblyService = DeliveryAssemblyService::singleton(); $queryBuilder =...
[ "protected", "function", "run", "(", ")", "{", "$", "report", "=", "common_report_Report", "::", "createInfo", "(", "'Deleting Failing deliveries'", ")", ";", "/** @var ComplexSearchService $search */", "$", "search", "=", "$", "this", "->", "getModel", "(", ")", ...
Run Script. Run the userland script. Implementers will use this method to implement the main logic of the script. @return \common_report_Report @throws \oat\search\base\exception\SearchGateWayExeption @throws \common_exception_Error
[ "Run", "Script", "." ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/scripts/tools/CleanFailedCompiledDeliveriesScript.php#L58-L91
oat-sa/extension-tao-delivery-rdf
model/theme/DeliveryThemeDetailsProvider.php
DeliveryThemeDetailsProvider.getDeliveryExecutionId
protected function getDeliveryExecutionId() { $request = \Context::getInstance()->getRequest(); $deliveryExecutionId = ''; if ($request->hasParameter('deliveryExecution')) { $deliveryExecutionId = \tao_helpers_Uri::decode( $request->getParameter('deliveryExecutio...
php
protected function getDeliveryExecutionId() { $request = \Context::getInstance()->getRequest(); $deliveryExecutionId = ''; if ($request->hasParameter('deliveryExecution')) { $deliveryExecutionId = \tao_helpers_Uri::decode( $request->getParameter('deliveryExecutio...
[ "protected", "function", "getDeliveryExecutionId", "(", ")", "{", "$", "request", "=", "\\", "Context", "::", "getInstance", "(", ")", "->", "getRequest", "(", ")", ";", "$", "deliveryExecutionId", "=", "''", ";", "if", "(", "$", "request", "->", "hasParam...
Returns the delivery execution identifier. @return string
[ "Returns", "the", "delivery", "execution", "identifier", "." ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/theme/DeliveryThemeDetailsProvider.php#L71-L91
oat-sa/extension-tao-delivery-rdf
model/theme/DeliveryThemeDetailsProvider.php
DeliveryThemeDetailsProvider.getDeliveryThemeIdFromCache
public function getDeliveryThemeIdFromCache($deliveryId) { if ($this->getCachePersistence() === null) { return false; } return $this->getCachePersistence()->get($this->getCacheKey($deliveryId)); }
php
public function getDeliveryThemeIdFromCache($deliveryId) { if ($this->getCachePersistence() === null) { return false; } return $this->getCachePersistence()->get($this->getCacheKey($deliveryId)); }
[ "public", "function", "getDeliveryThemeIdFromCache", "(", "$", "deliveryId", ")", "{", "if", "(", "$", "this", "->", "getCachePersistence", "(", ")", "===", "null", ")", "{", "return", "false", ";", "}", "return", "$", "this", "->", "getCachePersistence", "(...
Returns the delivery theme id from cache or FALSE when it does not exist. @param $deliveryId @return bool|common_Serializable
[ "Returns", "the", "delivery", "theme", "id", "from", "cache", "or", "FALSE", "when", "it", "does", "not", "exist", "." ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/theme/DeliveryThemeDetailsProvider.php#L163-L170
oat-sa/extension-tao-delivery-rdf
model/theme/DeliveryThemeDetailsProvider.php
DeliveryThemeDetailsProvider.getDeliveryThemeIdFromDb
public function getDeliveryThemeIdFromDb($deliveryId) { try { $delivery = new core_kernel_classes_Resource($deliveryId); $property = $delivery->getProperty(static::DELIVERY_THEME_ID_URI); return (string)$delivery->getOnePropertyValue($property); } catch (common_e...
php
public function getDeliveryThemeIdFromDb($deliveryId) { try { $delivery = new core_kernel_classes_Resource($deliveryId); $property = $delivery->getProperty(static::DELIVERY_THEME_ID_URI); return (string)$delivery->getOnePropertyValue($property); } catch (common_e...
[ "public", "function", "getDeliveryThemeIdFromDb", "(", "$", "deliveryId", ")", "{", "try", "{", "$", "delivery", "=", "new", "core_kernel_classes_Resource", "(", "$", "deliveryId", ")", ";", "$", "property", "=", "$", "delivery", "->", "getProperty", "(", "sta...
Returns delivery theme id from database. @param $deliveryId @return string
[ "Returns", "delivery", "theme", "id", "from", "database", "." ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/theme/DeliveryThemeDetailsProvider.php#L179-L189
oat-sa/extension-tao-delivery-rdf
model/theme/DeliveryThemeDetailsProvider.php
DeliveryThemeDetailsProvider.storeDeliveryThemeIdToCache
public function storeDeliveryThemeIdToCache($deliveryId, $themeId) { try { if ($this->getCachePersistence() !== null) { return $this->getCachePersistence()->set($this->getCacheKey($deliveryId), $themeId, $this->getCacheTtl()); } } catch (common_exception_NotIm...
php
public function storeDeliveryThemeIdToCache($deliveryId, $themeId) { try { if ($this->getCachePersistence() !== null) { return $this->getCachePersistence()->set($this->getCacheKey($deliveryId), $themeId, $this->getCacheTtl()); } } catch (common_exception_NotIm...
[ "public", "function", "storeDeliveryThemeIdToCache", "(", "$", "deliveryId", ",", "$", "themeId", ")", "{", "try", "{", "if", "(", "$", "this", "->", "getCachePersistence", "(", ")", "!==", "null", ")", "{", "return", "$", "this", "->", "getCachePersistence"...
Stores the delivery theme id to cache. @param $deliveryId @param $themeId @return bool
[ "Stores", "the", "delivery", "theme", "id", "to", "cache", "." ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/theme/DeliveryThemeDetailsProvider.php#L199-L209
oat-sa/extension-tao-delivery-rdf
model/theme/DeliveryThemeDetailsProvider.php
DeliveryThemeDetailsProvider.getCachePersistence
protected function getCachePersistence() { if (is_null($this->cachePersistence) && $this->hasOption(static::OPTION_CACHE_PERSISTENCE)) { $persistenceOption = $this->getOption(static::OPTION_CACHE_PERSISTENCE); $this->cachePersistence = (is_object($persistenceOption)) ...
php
protected function getCachePersistence() { if (is_null($this->cachePersistence) && $this->hasOption(static::OPTION_CACHE_PERSISTENCE)) { $persistenceOption = $this->getOption(static::OPTION_CACHE_PERSISTENCE); $this->cachePersistence = (is_object($persistenceOption)) ...
[ "protected", "function", "getCachePersistence", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "cachePersistence", ")", "&&", "$", "this", "->", "hasOption", "(", "static", "::", "OPTION_CACHE_PERSISTENCE", ")", ")", "{", "$", "persistenceOption"...
Returns the cache persistence. @return common_persistence_KvDriver
[ "Returns", "the", "cache", "persistence", "." ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/theme/DeliveryThemeDetailsProvider.php#L228-L238
oat-sa/extension-tao-delivery-rdf
model/theme/DeliveryThemeDetailsProvider.php
DeliveryThemeDetailsProvider.getCacheTtl
public function getCacheTtl() { if ($this->hasOption(static::OPTION_CACHE_PERSISTENCE_TTL)) { $cacheTtl = $this->getOption(static::OPTION_CACHE_PERSISTENCE_TTL); if (!is_null($cacheTtl)) { return $cacheTtl; } } return static::CACHE_PERSIST...
php
public function getCacheTtl() { if ($this->hasOption(static::OPTION_CACHE_PERSISTENCE_TTL)) { $cacheTtl = $this->getOption(static::OPTION_CACHE_PERSISTENCE_TTL); if (!is_null($cacheTtl)) { return $cacheTtl; } } return static::CACHE_PERSIST...
[ "public", "function", "getCacheTtl", "(", ")", "{", "if", "(", "$", "this", "->", "hasOption", "(", "static", "::", "OPTION_CACHE_PERSISTENCE_TTL", ")", ")", "{", "$", "cacheTtl", "=", "$", "this", "->", "getOption", "(", "static", "::", "OPTION_CACHE_PERSIS...
Returns the cache persistence's ttl. @return int|null
[ "Returns", "the", "cache", "persistence", "s", "ttl", "." ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/theme/DeliveryThemeDetailsProvider.php#L245-L255
oat-sa/extension-tao-delivery-rdf
model/tasks/UpdateDelivery.php
UpdateDelivery.createTask
public static function createTask($where = [], $propertyValues = []) { $serviceManager = ServiceManager::getServiceManager(); $action = new self(); $action->setServiceLocator($serviceManager); $parameters = [ self::OPTION_WHERE => $where, self::OPTION_PARAMET...
php
public static function createTask($where = [], $propertyValues = []) { $serviceManager = ServiceManager::getServiceManager(); $action = new self(); $action->setServiceLocator($serviceManager); $parameters = [ self::OPTION_WHERE => $where, self::OPTION_PARAMET...
[ "public", "static", "function", "createTask", "(", "$", "where", "=", "[", "]", ",", "$", "propertyValues", "=", "[", "]", ")", "{", "$", "serviceManager", "=", "ServiceManager", "::", "getServiceManager", "(", ")", ";", "$", "action", "=", "new", "self"...
Create a task to update a delivery @param array $where @param array $propertyValues @return TaskInterface
[ "Create", "a", "task", "to", "update", "a", "delivery" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/tasks/UpdateDelivery.php#L87-L100
oat-sa/extension-tao-delivery-rdf
model/SimpleDeliveryFactory.php
SimpleDeliveryFactory.create
public static function create(core_kernel_classes_Class $deliveryClass, core_kernel_classes_Resource $test, $label) { $factory = ServiceManager::getServiceManager()->get(DeliveryFactory::SERVICE_ID); return $factory->create($deliveryClass, $test, $label); }
php
public static function create(core_kernel_classes_Class $deliveryClass, core_kernel_classes_Resource $test, $label) { $factory = ServiceManager::getServiceManager()->get(DeliveryFactory::SERVICE_ID); return $factory->create($deliveryClass, $test, $label); }
[ "public", "static", "function", "create", "(", "core_kernel_classes_Class", "$", "deliveryClass", ",", "core_kernel_classes_Resource", "$", "test", ",", "$", "label", ")", "{", "$", "factory", "=", "ServiceManager", "::", "getServiceManager", "(", ")", "->", "get"...
Please use DeliveryFactory service @deprecated
[ "Please", "use", "DeliveryFactory", "service" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/SimpleDeliveryFactory.php#L39-L42
oat-sa/extension-tao-delivery-rdf
model/TrackedStorage.php
TrackedStorage.import
public function import($id, $directoryPath) { $this->ids[] = $id; return $this->getInternalStorage()->import($id, $directoryPath); }
php
public function import($id, $directoryPath) { $this->ids[] = $id; return $this->getInternalStorage()->import($id, $directoryPath); }
[ "public", "function", "import", "(", "$", "id", ",", "$", "directoryPath", ")", "{", "$", "this", "->", "ids", "[", "]", "=", "$", "id", ";", "return", "$", "this", "->", "getInternalStorage", "(", ")", "->", "import", "(", "$", "id", ",", "$", "...
{@inheritDoc} @see tao_models_classes_service_FileStorage::import()
[ "{" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/TrackedStorage.php#L64-L68
oat-sa/extension-tao-delivery-rdf
model/tasks/CompileDelivery.php
CompileDelivery.createTask
public static function createTask(\core_kernel_classes_Resource $test, \core_kernel_classes_Class $deliveryClass, array $initialProperties = []) { $action = new self(); /** @var QueueDispatcher $queueDispatcher */ $queueDispatcher = ServiceManager::getServiceManager()->get(QueueDispatcher::S...
php
public static function createTask(\core_kernel_classes_Resource $test, \core_kernel_classes_Class $deliveryClass, array $initialProperties = []) { $action = new self(); /** @var QueueDispatcher $queueDispatcher */ $queueDispatcher = ServiceManager::getServiceManager()->get(QueueDispatcher::S...
[ "public", "static", "function", "createTask", "(", "\\", "core_kernel_classes_Resource", "$", "test", ",", "\\", "core_kernel_classes_Class", "$", "deliveryClass", ",", "array", "$", "initialProperties", "=", "[", "]", ")", "{", "$", "action", "=", "new", "self"...
Create a task to compile a delivery into a delivery class @param \core_kernel_classes_Resource $test Test resource to be compiled @param \core_kernel_classes_Class $deliveryClass Delivery class where the test is compiled to @param array $initialProperties @return TaskInterface
[ "Create", "a", "task", "to", "compile", "a", "delivery", "into", "a", "delivery", "class" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/tasks/CompileDelivery.php#L121-L137
oat-sa/extension-tao-delivery-rdf
model/DeliveryAssemblyService.php
DeliveryAssemblyService.getFileStorage
protected function getFileStorage() { if (!$this->storageService) { $this->storageService = $this->getServiceManager()->get(\tao_models_classes_service_FileStorage::SERVICE_ID); } return $this->storageService; }
php
protected function getFileStorage() { if (!$this->storageService) { $this->storageService = $this->getServiceManager()->get(\tao_models_classes_service_FileStorage::SERVICE_ID); } return $this->storageService; }
[ "protected", "function", "getFileStorage", "(", ")", "{", "if", "(", "!", "$", "this", "->", "storageService", ")", "{", "$", "this", "->", "storageService", "=", "$", "this", "->", "getServiceManager", "(", ")", "->", "get", "(", "\\", "tao_models_classes...
Return the file storage @return \tao_models_classes_service_FileStorage
[ "Return", "the", "file", "storage" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/DeliveryAssemblyService.php#L78-L84
oat-sa/extension-tao-delivery-rdf
model/DeliveryAssemblyService.php
DeliveryAssemblyService.deleteInstance
public function deleteInstance(core_kernel_classes_Resource $assembly) { if ($this->deleteDeliveryRuntime($assembly)===false) { \common_Logger::i('Fail to delete runtimes assembly, process aborted'); } if ($this->deleteDeliveryDirectory($assembly)===false) { \common_...
php
public function deleteInstance(core_kernel_classes_Resource $assembly) { if ($this->deleteDeliveryRuntime($assembly)===false) { \common_Logger::i('Fail to delete runtimes assembly, process aborted'); } if ($this->deleteDeliveryDirectory($assembly)===false) { \common_...
[ "public", "function", "deleteInstance", "(", "core_kernel_classes_Resource", "$", "assembly", ")", "{", "if", "(", "$", "this", "->", "deleteDeliveryRuntime", "(", "$", "assembly", ")", "===", "false", ")", "{", "\\", "common_Logger", "::", "i", "(", "'Fail to...
Delete delivery by deleting runtime, directories & ontology record @param core_kernel_classes_Resource $assembly @return bool
[ "Delete", "delivery", "by", "deleting", "runtime", "directories", "&", "ontology", "record" ]
train
https://github.com/oat-sa/extension-tao-delivery-rdf/blob/340cee99ac75ccaaa63725b59a5befe4e2a7bb41/model/DeliveryAssemblyService.php#L112-L123