id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
27,300 | melisplatform/melis-core | src/Controller/MelisFlashMessengerController.php | MelisFlashMessengerController.headerFlashMessengerAction | public function headerFlashMessengerAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$flashMessenger = $this->getServiceLocator()->get('MelisCoreFlashMessenger');
$view = new ViewModel();
$view->melisKey = $melisKey;
$view->flashMessages = $this->g... | php | public function headerFlashMessengerAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$flashMessenger = $this->getServiceLocator()->get('MelisCoreFlashMessenger');
$view = new ViewModel();
$view->melisKey = $melisKey;
$view->flashMessages = $this->g... | [
"public",
"function",
"headerFlashMessengerAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"$",
"flashMessenger",
"=",
"$",
"this",
"->",
"getServiceLocator",
"... | Renders the Flash Messenger view in Melis CMS
@return \Zend\View\Model\ViewModel | [
"Renders",
"the",
"Flash",
"Messenger",
"view",
"in",
"Melis",
"CMS"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/MelisFlashMessengerController.php#L28-L38 |
27,301 | melisplatform/melis-core | src/Controller/MelisFlashMessengerController.php | MelisFlashMessengerController.getflashMessageAction | public function getflashMessageAction()
{
// translator service
$translator = $this->serviceLocator->get('translator');
// tool service
$tool = $this->getServiceLocator()->get('MelisCoretool');
// flash messenger service
$flashMessenger = $this->getServiceLo... | php | public function getflashMessageAction()
{
// translator service
$translator = $this->serviceLocator->get('translator');
// tool service
$tool = $this->getServiceLocator()->get('MelisCoretool');
// flash messenger service
$flashMessenger = $this->getServiceLo... | [
"public",
"function",
"getflashMessageAction",
"(",
")",
"{",
"// translator service",
"$",
"translator",
"=",
"$",
"this",
"->",
"serviceLocator",
"->",
"get",
"(",
"'translator'",
")",
";",
"// tool service",
"$",
"tool",
"=",
"$",
"this",
"->",
"getServiceLoc... | Returns the flash messages content
@return \Zend\View\Model\JsonModel | [
"Returns",
"the",
"flash",
"messages",
"content"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/MelisFlashMessengerController.php#L83-L119 |
27,302 | melisplatform/melis-core | src/Controller/MelisFlashMessengerController.php | MelisFlashMessengerController.logAction | public function logAction()
{
$flashMessenger = $this->getServiceLocator()->get('MelisCoreFlashMessenger');
$success = $this->params()->fromRoute('success', $this->params()->fromQuery('success', ''));
$title = $this->params()->fromRoute('textTitle', $this->params()->fromQuery('tex... | php | public function logAction()
{
$flashMessenger = $this->getServiceLocator()->get('MelisCoreFlashMessenger');
$success = $this->params()->fromRoute('success', $this->params()->fromQuery('success', ''));
$title = $this->params()->fromRoute('textTitle', $this->params()->fromQuery('tex... | [
"public",
"function",
"logAction",
"(",
")",
"{",
"$",
"flashMessenger",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'MelisCoreFlashMessenger'",
")",
";",
"$",
"success",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fr... | Logs into the flash messenger service | [
"Logs",
"into",
"the",
"flash",
"messenger",
"service"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/MelisFlashMessengerController.php#L124-L140 |
27,303 | locomotivemtl/charcoal-app | src/Charcoal/App/Script/PathScriptTrait.php | PathScriptTrait.processMultiplePaths | public function processMultiplePaths($paths)
{
$paths = $this->parseAsArray($paths);
$paths = array_map([ $this, 'filterPath' ], $paths);
$paths = array_filter($paths, [ $this, 'pathExists' ]);
if ($paths === false) {
throw new InvalidArgumentException('Received invalid ... | php | public function processMultiplePaths($paths)
{
$paths = $this->parseAsArray($paths);
$paths = array_map([ $this, 'filterPath' ], $paths);
$paths = array_filter($paths, [ $this, 'pathExists' ]);
if ($paths === false) {
throw new InvalidArgumentException('Received invalid ... | [
"public",
"function",
"processMultiplePaths",
"(",
"$",
"paths",
")",
"{",
"$",
"paths",
"=",
"$",
"this",
"->",
"parseAsArray",
"(",
"$",
"paths",
")",
";",
"$",
"paths",
"=",
"array_map",
"(",
"[",
"$",
"this",
",",
"'filterPath'",
"]",
",",
"$",
"... | Process multiple paths.
@param string|string[] $paths One or many paths to scan.
@throws InvalidArgumentException If the paths are invalid.
@return string[] | [
"Process",
"multiple",
"paths",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Script/PathScriptTrait.php#L38-L53 |
27,304 | locomotivemtl/charcoal-app | src/Charcoal/App/Script/PathScriptTrait.php | PathScriptTrait.pathExists | public function pathExists($path)
{
if (!is_string($path)) {
throw new InvalidArgumentException('The path must be a string.');
}
return $this->globRecursive($this->basePath().'/'.$path, GLOB_BRACE);
} | php | public function pathExists($path)
{
if (!is_string($path)) {
throw new InvalidArgumentException('The path must be a string.');
}
return $this->globRecursive($this->basePath().'/'.$path, GLOB_BRACE);
} | [
"public",
"function",
"pathExists",
"(",
"$",
"path",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"path",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'The path must be a string.'",
")",
";",
"}",
"return",
"$",
"this",
"->",
"glob... | Determine if the path exists.
@param string $path Path to the file or directory.
@throws InvalidArgumentException If the path is invalid.
@return boolean Returns TRUE if the path exists. | [
"Determine",
"if",
"the",
"path",
"exists",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Script/PathScriptTrait.php#L62-L69 |
27,305 | locomotivemtl/charcoal-app | src/Charcoal/App/Script/PathScriptTrait.php | PathScriptTrait.filterPath | public function filterPath($path, $trim = null)
{
if (!is_string($path)) {
throw new InvalidArgumentException('The path must be a string.');
}
if ($trim === null && defined(get_called_class().'::DIRECTORY_SEPARATORS')) {
$trim = static::DIRECTORY_SEPARATORS;
... | php | public function filterPath($path, $trim = null)
{
if (!is_string($path)) {
throw new InvalidArgumentException('The path must be a string.');
}
if ($trim === null && defined(get_called_class().'::DIRECTORY_SEPARATORS')) {
$trim = static::DIRECTORY_SEPARATORS;
... | [
"public",
"function",
"filterPath",
"(",
"$",
"path",
",",
"$",
"trim",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"path",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"'The path must be a string.'",
")",
";",
"}",
"... | Filter the given path.
Trims leading and trailing directory paths
@param string $path Path to the file or directory.
@param string|null $trim The characters to strip from the $path.
@throws InvalidArgumentException If the path is invalid.
@return string Returns the filtered path. | [
"Filter",
"the",
"given",
"path",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Script/PathScriptTrait.php#L81-L102 |
27,306 | locomotivemtl/charcoal-app | src/Charcoal/App/Script/PathScriptTrait.php | PathScriptTrait.filterWritablePath | public function filterWritablePath($path, $name = null)
{
if ($name === null && defined(get_called_class().'::DEFAULT_BASENAME')) {
$name = static::DEFAULT_BASENAME;
}
if (!is_string($name)) {
throw new InvalidArgumentException(
'The target file name ... | php | public function filterWritablePath($path, $name = null)
{
if ($name === null && defined(get_called_class().'::DEFAULT_BASENAME')) {
$name = static::DEFAULT_BASENAME;
}
if (!is_string($name)) {
throw new InvalidArgumentException(
'The target file name ... | [
"public",
"function",
"filterWritablePath",
"(",
"$",
"path",
",",
"$",
"name",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"name",
"===",
"null",
"&&",
"defined",
"(",
"get_called_class",
"(",
")",
".",
"'::DEFAULT_BASENAME'",
")",
")",
"{",
"$",
"name",
"... | Filter the given path to be writable.
@param string $path A writable path to a file or directory.
@param string|null $name The target file name.
@throws InvalidArgumentException If the path is invalid.
@return string Returns the filtered path. | [
"Filter",
"the",
"given",
"path",
"to",
"be",
"writable",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Script/PathScriptTrait.php#L112-L143 |
27,307 | locomotivemtl/charcoal-app | src/Charcoal/App/Script/PathScriptTrait.php | PathScriptTrait.globRecursive | public function globRecursive($pattern, $flags = 0)
{
$maxDepth = $this->maxDepth();
$depthKey = strval($maxDepth);
if (isset(static::$globCache[$pattern][$depthKey])) {
return static::$globCache[$pattern][$depthKey];
}
$depth = 1;
$files = glob($pattern... | php | public function globRecursive($pattern, $flags = 0)
{
$maxDepth = $this->maxDepth();
$depthKey = strval($maxDepth);
if (isset(static::$globCache[$pattern][$depthKey])) {
return static::$globCache[$pattern][$depthKey];
}
$depth = 1;
$files = glob($pattern... | [
"public",
"function",
"globRecursive",
"(",
"$",
"pattern",
",",
"$",
"flags",
"=",
"0",
")",
"{",
"$",
"maxDepth",
"=",
"$",
"this",
"->",
"maxDepth",
"(",
")",
";",
"$",
"depthKey",
"=",
"strval",
"(",
"$",
"maxDepth",
")",
";",
"if",
"(",
"isset... | Recursively find pathnames matching a pattern.
@see http://in.php.net/manual/en/function.glob.php#106595
@param string $pattern The search pattern.
@param integer $flags Bitmask of {@see glob()} options.
@return array | [
"Recursively",
"find",
"pathnames",
"matching",
"a",
"pattern",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Script/PathScriptTrait.php#L153-L175 |
27,308 | melisplatform/melis-core | src/View/Helper/MelisModal.php | MelisModal.setTabContent | public function setTabContent(array $tab)
{
if($tab && is_array($tab)) {
foreach($tab as $attrib => $values)
{
$this->_tabs .= '<li><a href="#'.$values['id'].'" class="'.$values['class'].'" data-toggle="tab"><i></i><span class="strong">'.$values['tab-head... | php | public function setTabContent(array $tab)
{
if($tab && is_array($tab)) {
foreach($tab as $attrib => $values)
{
$this->_tabs .= '<li><a href="#'.$values['id'].'" class="'.$values['class'].'" data-toggle="tab"><i></i><span class="strong">'.$values['tab-head... | [
"public",
"function",
"setTabContent",
"(",
"array",
"$",
"tab",
")",
"{",
"if",
"(",
"$",
"tab",
"&&",
"is_array",
"(",
"$",
"tab",
")",
")",
"{",
"foreach",
"(",
"$",
"tab",
"as",
"$",
"attrib",
"=>",
"$",
"values",
")",
"{",
"$",
"this",
"->",... | Sets a single tab in a modal without an active tab
@param array $tab | [
"Sets",
"a",
"single",
"tab",
"in",
"a",
"modal",
"without",
"an",
"active",
"tab"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/View/Helper/MelisModal.php#L105-L115 |
27,309 | melisplatform/melis-core | src/View/Helper/MelisModal.php | MelisModal.getTabPosition | protected function getTabPosition(array $tabs, $tabValue)
{
$position = 0;
$ctr = 0;
foreach($tabs as $keys => $values)
{
if($keys == $tabValue)
{
$position = $ctr;
}
$ctr++;
}
return $position;
} | php | protected function getTabPosition(array $tabs, $tabValue)
{
$position = 0;
$ctr = 0;
foreach($tabs as $keys => $values)
{
if($keys == $tabValue)
{
$position = $ctr;
}
$ctr++;
}
return $position;
} | [
"protected",
"function",
"getTabPosition",
"(",
"array",
"$",
"tabs",
",",
"$",
"tabValue",
")",
"{",
"$",
"position",
"=",
"0",
";",
"$",
"ctr",
"=",
"0",
";",
"foreach",
"(",
"$",
"tabs",
"as",
"$",
"keys",
"=>",
"$",
"values",
")",
"{",
"if",
... | Returns the position of the Tab you want to
be selected.
@param array $tabs
@param String $tabValue
@return int | [
"Returns",
"the",
"position",
"of",
"the",
"Tab",
"you",
"want",
"to",
"be",
"selected",
"."
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/View/Helper/MelisModal.php#L160-L173 |
27,310 | melisplatform/melis-core | src/View/Helper/MelisModal.php | MelisModal.setContents | protected function setContents(array $contents)
{
$loopCtr = 0;
if($contents && is_array($contents))
{
foreach($contents as $attrib => $values)
{
if($this->_defaultTab == $loopCtr)
{
$this->_contents .= '<div class="... | php | protected function setContents(array $contents)
{
$loopCtr = 0;
if($contents && is_array($contents))
{
foreach($contents as $attrib => $values)
{
if($this->_defaultTab == $loopCtr)
{
$this->_contents .= '<div class="... | [
"protected",
"function",
"setContents",
"(",
"array",
"$",
"contents",
")",
"{",
"$",
"loopCtr",
"=",
"0",
";",
"if",
"(",
"$",
"contents",
"&&",
"is_array",
"(",
"$",
"contents",
")",
")",
"{",
"foreach",
"(",
"$",
"contents",
"as",
"$",
"attrib",
"... | Sets the contents of each Modal Tab
@param array $contents | [
"Sets",
"the",
"contents",
"of",
"each",
"Modal",
"Tab"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/View/Helper/MelisModal.php#L179-L199 |
27,311 | melisplatform/melis-core | src/View/Helper/MelisModal.php | MelisModal.setContent | protected function setContent(array $contents)
{
if($contents && is_array($contents))
{
foreach($contents as $attrib => $values)
{
$this->_contents .= '<div class="tab-pane" id="'.$values['id'].'"><div class="row"><div class="col-md-12">'.$values['content'].'... | php | protected function setContent(array $contents)
{
if($contents && is_array($contents))
{
foreach($contents as $attrib => $values)
{
$this->_contents .= '<div class="tab-pane" id="'.$values['id'].'"><div class="row"><div class="col-md-12">'.$values['content'].'... | [
"protected",
"function",
"setContent",
"(",
"array",
"$",
"contents",
")",
"{",
"if",
"(",
"$",
"contents",
"&&",
"is_array",
"(",
"$",
"contents",
")",
")",
"{",
"foreach",
"(",
"$",
"contents",
"as",
"$",
"attrib",
"=>",
"$",
"values",
")",
"{",
"$... | Sets the content of a specific tab
@param array $contents | [
"Sets",
"the",
"content",
"of",
"a",
"specific",
"tab"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/View/Helper/MelisModal.php#L205-L215 |
27,312 | melisplatform/melis-core | src/View/Helper/MelisModal.php | MelisModal.renderModal | public function renderModal()
{
$this->_modal = '
<div class="tooltabmodal modal fade" id="'.$this->getModalId().'" aria-hidden="true" style="display: none; " '. $this->getAttributes() . '>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body pa... | php | public function renderModal()
{
$this->_modal = '
<div class="tooltabmodal modal fade" id="'.$this->getModalId().'" aria-hidden="true" style="display: none; " '. $this->getAttributes() . '>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body pa... | [
"public",
"function",
"renderModal",
"(",
")",
"{",
"$",
"this",
"->",
"_modal",
"=",
"'\n <div class=\"tooltabmodal modal fade\" id=\"'",
".",
"$",
"this",
"->",
"getModalId",
"(",
")",
".",
"'\" aria-hidden=\"true\" style=\"display: none; \" '",
".",
"$",
"this... | Renders all config that has been set to create a modal
@return string | [
"Renders",
"all",
"config",
"that",
"has",
"been",
"set",
"to",
"create",
"a",
"modal"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/View/Helper/MelisModal.php#L256-L276 |
27,313 | orchestral/kernel | src/Http/RouteResolver.php | RouteResolver.integrateWithExtension | protected function integrateWithExtension(Application $app): void
{
if ($app->bound('orchestra.extension')) {
$this->extension = $app->make('orchestra.extension');
}
if ($app->bound('orchestra.extension.status')) {
$this->status = $app->make('orchestra.extension.stat... | php | protected function integrateWithExtension(Application $app): void
{
if ($app->bound('orchestra.extension')) {
$this->extension = $app->make('orchestra.extension');
}
if ($app->bound('orchestra.extension.status')) {
$this->status = $app->make('orchestra.extension.stat... | [
"protected",
"function",
"integrateWithExtension",
"(",
"Application",
"$",
"app",
")",
":",
"void",
"{",
"if",
"(",
"$",
"app",
"->",
"bound",
"(",
"'orchestra.extension'",
")",
")",
"{",
"$",
"this",
"->",
"extension",
"=",
"$",
"app",
"->",
"make",
"(... | Integrate with Orchestra Extension.
@param \Illuminate\Contracts\Foundation\Application $app
@return void | [
"Integrate",
"with",
"Orchestra",
"Extension",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Http/RouteResolver.php#L72-L81 |
27,314 | orchestral/kernel | src/Http/RouteResolver.php | RouteResolver.generateRouteByName | protected function generateRouteByName(string $name, string $default)
{
if (is_null($this->extension)) {
return $default;
}
return $this->extension->route($name, $default);
} | php | protected function generateRouteByName(string $name, string $default)
{
if (is_null($this->extension)) {
return $default;
}
return $this->extension->route($name, $default);
} | [
"protected",
"function",
"generateRouteByName",
"(",
"string",
"$",
"name",
",",
"string",
"$",
"default",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"extension",
")",
")",
"{",
"return",
"$",
"default",
";",
"}",
"return",
"$",
"this",
"-... | Generate route by name.
@param string $name
@param string $default
@return \Orchestra\Contracts\Extension\UrlGenerator | [
"Generate",
"route",
"by",
"name",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Http/RouteResolver.php#L190-L197 |
27,315 | orchestral/kernel | src/Http/RouteResolver.php | RouteResolver.prepareHttpQueryString | protected function prepareHttpQueryString(string $query, array $appends = []): string
{
if (! empty($appends)) {
$query .= (! empty($query) ? '&' : '').http_build_query($appends);
}
return $query;
} | php | protected function prepareHttpQueryString(string $query, array $appends = []): string
{
if (! empty($appends)) {
$query .= (! empty($query) ? '&' : '').http_build_query($appends);
}
return $query;
} | [
"protected",
"function",
"prepareHttpQueryString",
"(",
"string",
"$",
"query",
",",
"array",
"$",
"appends",
"=",
"[",
"]",
")",
":",
"string",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"appends",
")",
")",
"{",
"$",
"query",
".=",
"(",
"!",
"empty",
... | Prepare HTTP query string.
@param string $query
@param array $appends
@return string | [
"Prepare",
"HTTP",
"query",
"string",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Http/RouteResolver.php#L240-L247 |
27,316 | orchestral/kernel | src/Http/RouteResolver.php | RouteResolver.getCsrfToken | protected function getCsrfToken(): ?string
{
if (is_null($this->csrfToken)) {
$this->csrfToken = $this->app->make('session')->token();
}
return $this->csrfToken;
} | php | protected function getCsrfToken(): ?string
{
if (is_null($this->csrfToken)) {
$this->csrfToken = $this->app->make('session')->token();
}
return $this->csrfToken;
} | [
"protected",
"function",
"getCsrfToken",
"(",
")",
":",
"?",
"string",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"csrfToken",
")",
")",
"{",
"$",
"this",
"->",
"csrfToken",
"=",
"$",
"this",
"->",
"app",
"->",
"make",
"(",
"'session'",
")",
... | Get CSRF Token.
@return string|null | [
"Get",
"CSRF",
"Token",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Http/RouteResolver.php#L254-L261 |
27,317 | melisplatform/melis-core | src/Service/MelisPhpUnitToolService.php | MelisPhpUnitToolService.init | public function init($moduleName, $moduleTestName, $unitTestPath = 'test')
{
$moduleSvc = $this->getServiceLocator()->get('ModulesService');
$modulePath = $moduleSvc->getModulePath($moduleName);
$bootstrapSavePath = $modulePath.'/'.$unitTestPath.'/Bootstrap.php';
$xmlSavePath = $modu... | php | public function init($moduleName, $moduleTestName, $unitTestPath = 'test')
{
$moduleSvc = $this->getServiceLocator()->get('ModulesService');
$modulePath = $moduleSvc->getModulePath($moduleName);
$bootstrapSavePath = $modulePath.'/'.$unitTestPath.'/Bootstrap.php';
$xmlSavePath = $modu... | [
"public",
"function",
"init",
"(",
"$",
"moduleName",
",",
"$",
"moduleTestName",
",",
"$",
"unitTestPath",
"=",
"'test'",
")",
"{",
"$",
"moduleSvc",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'ModulesService'",
")",
";",
... | Bootstrap.php file will be created inside the test folder
@param String $moduleName
@param String $testModuleName
@param String $unitTestPath | [
"Bootstrap",
".",
"php",
"file",
"will",
"be",
"created",
"inside",
"the",
"test",
"folder"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisPhpUnitToolService.php#L67-L127 |
27,318 | melisplatform/melis-core | src/Service/MelisPhpUnitToolService.php | MelisPhpUnitToolService.simplifyResultsView | private function simplifyResultsView($results)
{
$simplified = array();
if(is_array($results)) {
$simplified['tests'] = array();
$totalTests = 0;
$totalFailed = 0;
$totalSuccess = 0;
if(isset($results['testcase'])) {
$testca... | php | private function simplifyResultsView($results)
{
$simplified = array();
if(is_array($results)) {
$simplified['tests'] = array();
$totalTests = 0;
$totalFailed = 0;
$totalSuccess = 0;
if(isset($results['testcase'])) {
$testca... | [
"private",
"function",
"simplifyResultsView",
"(",
"$",
"results",
")",
"{",
"$",
"simplified",
"=",
"array",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"results",
")",
")",
"{",
"$",
"simplified",
"[",
"'tests'",
"]",
"=",
"array",
"(",
")",
";... | Simplifies the output of the PHPUnit result
@param $results
@return array|string | [
"Simplifies",
"the",
"output",
"of",
"the",
"PHPUnit",
"result"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisPhpUnitToolService.php#L227-L305 |
27,319 | melisplatform/melis-core | src/Service/MelisPhpUnitToolService.php | MelisPhpUnitToolService.getPayload | public function getPayload($module, $methodName)
{
$payloads = array();
$config = $this->getServiceLocator()->get('MelisCoreConfig');
$payloads = $config->getItem('diagnostic/'.$module.'/methods/'. $this->getMethodName($methodName) .'/payloads');
return $payloads;
} | php | public function getPayload($module, $methodName)
{
$payloads = array();
$config = $this->getServiceLocator()->get('MelisCoreConfig');
$payloads = $config->getItem('diagnostic/'.$module.'/methods/'. $this->getMethodName($methodName) .'/payloads');
return $payloads;
} | [
"public",
"function",
"getPayload",
"(",
"$",
"module",
",",
"$",
"methodName",
")",
"{",
"$",
"payloads",
"=",
"array",
"(",
")",
";",
"$",
"config",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'MelisCoreConfig'",
")",
";... | Returns the payload data from the diagnostic.config
@param $module
@param $methodName
@return array | [
"Returns",
"the",
"payload",
"data",
"from",
"the",
"diagnostic",
".",
"config"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisPhpUnitToolService.php#L328-L337 |
27,320 | melisplatform/melis-core | src/Controller/ModulesController.php | ModulesController.renderToolModulesAction | public function renderToolModulesAction()
{
$translator = $this->getServiceLocator()->get('translator');
$moduleSvc = $this->getServiceLocator()->get('ModulesService');
$coreTool = $this->getServiceLocator()->get('MelisCoreTool');
$modules = $moduleSvc->ge... | php | public function renderToolModulesAction()
{
$translator = $this->getServiceLocator()->get('translator');
$moduleSvc = $this->getServiceLocator()->get('ModulesService');
$coreTool = $this->getServiceLocator()->get('MelisCoreTool');
$modules = $moduleSvc->ge... | [
"public",
"function",
"renderToolModulesAction",
"(",
")",
"{",
"$",
"translator",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'translator'",
")",
";",
"$",
"moduleSvc",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"... | Main Tool Container
@return \Zend\View\Model\ViewModel | [
"Main",
"Tool",
"Container"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ModulesController.php#L42-L70 |
27,321 | melisplatform/melis-core | src/Controller/ModulesController.php | ModulesController.renderToolModulesContentAction | public function renderToolModulesContentAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$zoneConfig = $this->params()->fromRoute('zoneconfig', array());
$modulesInfo = $this->getModuleSvc()->getModulesAndVersions();
$modules = $this->getModules();
//exclud... | php | public function renderToolModulesContentAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$zoneConfig = $this->params()->fromRoute('zoneconfig', array());
$modulesInfo = $this->getModuleSvc()->getModulesAndVersions();
$modules = $this->getModules();
//exclud... | [
"public",
"function",
"renderToolModulesContentAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"$",
"zoneConfig",
"=",
"$",
"this",
"->",
"params",
"(",
")",
... | Renders the content section of the tool
@return \Zend\View\Model\ViewModel | [
"Renders",
"the",
"content",
"section",
"of",
"the",
"tool"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ModulesController.php#L93-L112 |
27,322 | melisplatform/melis-core | src/Controller/ModulesController.php | ModulesController.saveModuleChangesAction | public function saveModuleChangesAction()
{
$translator = $this->getServiceLocator()->get('translator');
$request = $this->getRequest();
$success = 0;
$textTitle = 'tr_meliscore_module_management_modules';
$textMessage = 'tr_meliscore_module_management_prompt_failed';
... | php | public function saveModuleChangesAction()
{
$translator = $this->getServiceLocator()->get('translator');
$request = $this->getRequest();
$success = 0;
$textTitle = 'tr_meliscore_module_management_modules';
$textMessage = 'tr_meliscore_module_management_prompt_failed';
... | [
"public",
"function",
"saveModuleChangesAction",
"(",
")",
"{",
"$",
"translator",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'translator'",
")",
";",
"$",
"request",
"=",
"$",
"this",
"->",
"getRequest",
"(",
")",
";",
"$"... | Saves the changes of the module modifications
@return JsonModel | [
"Saves",
"the",
"changes",
"of",
"the",
"module",
"modifications"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ModulesController.php#L131-L167 |
27,323 | melisplatform/melis-core | src/Controller/ModulesController.php | ModulesController.getDependentsAction | public function getDependentsAction()
{
$success = 0;
$modules = array();
$request = $this->getRequest();
$message = 'tr_meliscore_module_management_no_dependencies';
$tool = $this->getServiceLocator()->get('MelisCoreTool');
if ($request->isPost()) {
$... | php | public function getDependentsAction()
{
$success = 0;
$modules = array();
$request = $this->getRequest();
$message = 'tr_meliscore_module_management_no_dependencies';
$tool = $this->getServiceLocator()->get('MelisCoreTool');
if ($request->isPost()) {
$... | [
"public",
"function",
"getDependentsAction",
"(",
")",
"{",
"$",
"success",
"=",
"0",
";",
"$",
"modules",
"=",
"array",
"(",
")",
";",
"$",
"request",
"=",
"$",
"this",
"->",
"getRequest",
"(",
")",
";",
"$",
"message",
"=",
"'tr_meliscore_module_manage... | Returns the module that is dependent to the provided module
@return JsonModel | [
"Returns",
"the",
"module",
"that",
"is",
"dependent",
"to",
"the",
"provided",
"module"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ModulesController.php#L238-L266 |
27,324 | chillerlan/php-authenticator | src/AuthenticatorOptionsTrait.php | AuthenticatorOptionsTrait.set_digits | protected function set_digits(int $digits):void{
if(!in_array($digits, [6, 8], true)){
throw new AuthenticatorException('Invalid code length: '.$digits);
}
$this->digits = $digits;
} | php | protected function set_digits(int $digits):void{
if(!in_array($digits, [6, 8], true)){
throw new AuthenticatorException('Invalid code length: '.$digits);
}
$this->digits = $digits;
} | [
"protected",
"function",
"set_digits",
"(",
"int",
"$",
"digits",
")",
":",
"void",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"digits",
",",
"[",
"6",
",",
"8",
"]",
",",
"true",
")",
")",
"{",
"throw",
"new",
"AuthenticatorException",
"(",
"'Invali... | Sets the code length to either 6 or 8
@param int $digits
@return void
@throws \chillerlan\Authenticator\AuthenticatorException | [
"Sets",
"the",
"code",
"length",
"to",
"either",
"6",
"or",
"8"
] | 3d13f35038c4a71e9e101110f821ca7e0679f5ea | https://github.com/chillerlan/php-authenticator/blob/3d13f35038c4a71e9e101110f821ca7e0679f5ea/src/AuthenticatorOptionsTrait.php#L72-L79 |
27,325 | chillerlan/php-authenticator | src/AuthenticatorOptionsTrait.php | AuthenticatorOptionsTrait.set_period | protected function set_period(int $period):void{
if($period < 15 || $period > 60){
throw new AuthenticatorException('Invalid period: '.$period);
}
$this->period = $period;
} | php | protected function set_period(int $period):void{
if($period < 15 || $period > 60){
throw new AuthenticatorException('Invalid period: '.$period);
}
$this->period = $period;
} | [
"protected",
"function",
"set_period",
"(",
"int",
"$",
"period",
")",
":",
"void",
"{",
"if",
"(",
"$",
"period",
"<",
"15",
"||",
"$",
"period",
">",
"60",
")",
"{",
"throw",
"new",
"AuthenticatorException",
"(",
"'Invalid period: '",
".",
"$",
"period... | Sets the period to a value between 10 and 60 seconds
@param int $period
@return void
@throws \chillerlan\Authenticator\AuthenticatorException | [
"Sets",
"the",
"period",
"to",
"a",
"value",
"between",
"10",
"and",
"60",
"seconds"
] | 3d13f35038c4a71e9e101110f821ca7e0679f5ea | https://github.com/chillerlan/php-authenticator/blob/3d13f35038c4a71e9e101110f821ca7e0679f5ea/src/AuthenticatorOptionsTrait.php#L89-L96 |
27,326 | melisplatform/melis-core | src/Controller/UserController.php | UserController.retrievePageAction | public function retrievePageAction()
{
$configPath = 'meliscore/datas';
$melisConfig = $this->getServiceLocator()->get('MelisCoreConfig');
$cfg = $melisConfig->getItemPerPlatform($configPath);
$pathAppConfigForm = '/meliscore/forms/meliscore_forgot';
$melisMelisCore... | php | public function retrievePageAction()
{
$configPath = 'meliscore/datas';
$melisConfig = $this->getServiceLocator()->get('MelisCoreConfig');
$cfg = $melisConfig->getItemPerPlatform($configPath);
$pathAppConfigForm = '/meliscore/forms/meliscore_forgot';
$melisMelisCore... | [
"public",
"function",
"retrievePageAction",
"(",
")",
"{",
"$",
"configPath",
"=",
"'meliscore/datas'",
";",
"$",
"melisConfig",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'MelisCoreConfig'",
")",
";",
"$",
"cfg",
"=",
"$",
"... | Renders to the Lost Password form
@return \Zend\View\Model\ViewModel | [
"Renders",
"to",
"the",
"Lost",
"Password",
"form"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/UserController.php#L55-L80 |
27,327 | melisplatform/melis-core | src/Controller/UserController.php | UserController.lostPasswordRequestAction | public function lostPasswordRequestAction()
{
$pathAppConfigForm = '/meliscore/forms/meliscore_forgot';
$melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$appConfigForm = $melisMelisCoreConfig->getItem($pathAppConfigForm);
$translator = $this->getServiceLocator(... | php | public function lostPasswordRequestAction()
{
$pathAppConfigForm = '/meliscore/forms/meliscore_forgot';
$melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$appConfigForm = $melisMelisCoreConfig->getItem($pathAppConfigForm);
$translator = $this->getServiceLocator(... | [
"public",
"function",
"lostPasswordRequestAction",
"(",
")",
"{",
"$",
"pathAppConfigForm",
"=",
"'/meliscore/forms/meliscore_forgot'",
";",
"$",
"melisMelisCoreConfig",
"=",
"$",
"this",
"->",
"serviceLocator",
"->",
"get",
"(",
"'MelisCoreConfig'",
")",
";",
"$",
... | Processes the lost password request
@return \Zend\View\Model\JsonModel | [
"Processes",
"the",
"lost",
"password",
"request"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/UserController.php#L86-L135 |
27,328 | melisplatform/melis-core | src/Controller/UserController.php | UserController.setHashAction | protected function setHashAction() {
$hash = $this->params()->fromRoute('rhash', $this->params()->fromQuery('rhash',''));
$this->_hash = $hash;
} | php | protected function setHashAction() {
$hash = $this->params()->fromRoute('rhash', $this->params()->fromQuery('rhash',''));
$this->_hash = $hash;
} | [
"protected",
"function",
"setHashAction",
"(",
")",
"{",
"$",
"hash",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'rhash'",
",",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromQuery",
"(",
"'rhash'",
",",
"''",
")",
")",
... | Retrieves the passed hash | [
"Retrieves",
"the",
"passed",
"hash"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/UserController.php#L349-L352 |
27,329 | melisplatform/melis-core | public/js/filemanager/include/FtpClient.php | FtpClient.setPhpLimit | public function setPhpLimit($memory = null, $time_limit = 0, $ignore_user_abort = true)
{
if (null !== $memory) {
ini_set('memory_limit', $memory);
}
ignore_user_abort(true);
set_time_limit($time_limit);
return $this;
} | php | public function setPhpLimit($memory = null, $time_limit = 0, $ignore_user_abort = true)
{
if (null !== $memory) {
ini_set('memory_limit', $memory);
}
ignore_user_abort(true);
set_time_limit($time_limit);
return $this;
} | [
"public",
"function",
"setPhpLimit",
"(",
"$",
"memory",
"=",
"null",
",",
"$",
"time_limit",
"=",
"0",
",",
"$",
"ignore_user_abort",
"=",
"true",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"memory",
")",
"{",
"ini_set",
"(",
"'memory_limit'",
",",
"$",... | Overwrites the PHP limit
@param string|null $memory The memory limit, if null is not modified
@param int $time_limit The max execution time, unlimited by default
@param bool $ignore_user_abort Ignore user abort, true by default
@return FtpClient | [
"Overwrites",
"the",
"PHP",
"limit"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/public/js/filemanager/include/FtpClient.php#L117-L127 |
27,330 | melisplatform/melis-core | public/js/filemanager/include/FtpClient.php | FtpClient.nlist | public function nlist($directory = '.', $recursive = false, $filter = 'sort')
{
if (!$this->isDir($directory)) {
throw new FtpException('"'.$directory.'" is not a directory');
}
$files = $this->ftp->nlist($directory);
if ($files === false) {
throw new FtpExc... | php | public function nlist($directory = '.', $recursive = false, $filter = 'sort')
{
if (!$this->isDir($directory)) {
throw new FtpException('"'.$directory.'" is not a directory');
}
$files = $this->ftp->nlist($directory);
if ($files === false) {
throw new FtpExc... | [
"public",
"function",
"nlist",
"(",
"$",
"directory",
"=",
"'.'",
",",
"$",
"recursive",
"=",
"false",
",",
"$",
"filter",
"=",
"'sort'",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isDir",
"(",
"$",
"directory",
")",
")",
"{",
"throw",
"new",
... | Returns a list of files in the given directory.
@param string $directory The directory, by default is "." the current directory
@param bool $recursive
@param callable $filter A callable to filter the result, by default is asort() PHP function.
The result is passed in array argument,
must take the argument by ... | [
"Returns",
"a",
"list",
"of",
"files",
"in",
"the",
"given",
"directory",
"."
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/public/js/filemanager/include/FtpClient.php#L271-L349 |
27,331 | melisplatform/melis-core | public/js/filemanager/include/FtpClient.php | FtpClient.parseRawList | public function parseRawList(array $rawlist)
{
$items = array();
$path = '';
foreach ($rawlist as $key => $child) {
$chunks = preg_split("/\s+/", $child);
if (isset($chunks[8]) && ($chunks[8] == '.' or $chunks[8] == '..')) {
continue;
}
... | php | public function parseRawList(array $rawlist)
{
$items = array();
$path = '';
foreach ($rawlist as $key => $child) {
$chunks = preg_split("/\s+/", $child);
if (isset($chunks[8]) && ($chunks[8] == '.' or $chunks[8] == '..')) {
continue;
}
... | [
"public",
"function",
"parseRawList",
"(",
"array",
"$",
"rawlist",
")",
"{",
"$",
"items",
"=",
"array",
"(",
")",
";",
"$",
"path",
"=",
"''",
";",
"foreach",
"(",
"$",
"rawlist",
"as",
"$",
"key",
"=>",
"$",
"child",
")",
"{",
"$",
"chunks",
"... | Parse raw list.
@see FtpClient::rawlist()
@see FtpClient::scanDir()
@see FtpClient::dirSize()
@param array $rawlist
@return array | [
"Parse",
"raw",
"list",
"."
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/public/js/filemanager/include/FtpClient.php#L761-L835 |
27,332 | orchestral/kernel | src/Publisher/AssetManager.php | AssetManager.foundation | public function foundation(): bool
{
$path = \rtrim($this->app->basePath(), '/').'/vendor/orchestra/foundation/public';
if (! $this->app->make('files')->isDirectory($path)) {
return false;
}
try {
return $this->publish('orchestra/foundation', $path);
... | php | public function foundation(): bool
{
$path = \rtrim($this->app->basePath(), '/').'/vendor/orchestra/foundation/public';
if (! $this->app->make('files')->isDirectory($path)) {
return false;
}
try {
return $this->publish('orchestra/foundation', $path);
... | [
"public",
"function",
"foundation",
"(",
")",
":",
"bool",
"{",
"$",
"path",
"=",
"\\",
"rtrim",
"(",
"$",
"this",
"->",
"app",
"->",
"basePath",
"(",
")",
",",
"'/'",
")",
".",
"'/vendor/orchestra/foundation/public'",
";",
"if",
"(",
"!",
"$",
"this",... | Migrate Orchestra Platform.
@throws \Orchestra\Contracts\Publisher\FilePermissionException
@return bool | [
"Migrate",
"Orchestra",
"Platform",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Publisher/AssetManager.php#L81-L94 |
27,333 | melisplatform/melis-core | src/Controller/LanguageController.php | LanguageController.headerLanguageAction | public function headerLanguageAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$tableLang = $this->getServiceLocator()->get('MelisCoreTableLang');
$moduleSvc = $this->getServiceLocator()->get('ModulesService');
$datasLang = $tableLang->fetchAll();
// Get t... | php | public function headerLanguageAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$tableLang = $this->getServiceLocator()->get('MelisCoreTableLang');
$moduleSvc = $this->getServiceLocator()->get('ModulesService');
$datasLang = $tableLang->fetchAll();
// Get t... | [
"public",
"function",
"headerLanguageAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"$",
"tableLang",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
... | Shows language button in right corner of header
@return \Zend\View\Model\ViewModel | [
"Shows",
"language",
"button",
"in",
"right",
"corner",
"of",
"header"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/LanguageController.php#L31-L59 |
27,334 | melisplatform/melis-core | src/Controller/LanguageController.php | LanguageController.changeLanguageAction | public function changeLanguageAction()
{
$langId = $this->params()->fromQuery('langId', null);
$locale = '';
$success = true;
$errors = array();
if (empty($langId) || !is_numeric($langId) || $langId <= 0)
$success = false;
$melisLangTable = $this->service... | php | public function changeLanguageAction()
{
$langId = $this->params()->fromQuery('langId', null);
$locale = '';
$success = true;
$errors = array();
if (empty($langId) || !is_numeric($langId) || $langId <= 0)
$success = false;
$melisLangTable = $this->service... | [
"public",
"function",
"changeLanguageAction",
"(",
")",
"{",
"$",
"langId",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromQuery",
"(",
"'langId'",
",",
"null",
")",
";",
"$",
"locale",
"=",
"''",
";",
"$",
"success",
"=",
"true",
";",
"$",
... | Change the language
@return \Zend\View\Model\JsonModel | [
"Change",
"the",
"language"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/LanguageController.php#L66-L127 |
27,335 | melisplatform/melis-core | src/Controller/LanguageController.php | LanguageController.getTranslationsAction | public function getTranslationsAction()
{
// Get the current language
$container = new Container('meliscore');
$locale = $container['melis-lang-locale'];
$translator = $this->getServiceLocator()->get('translator');
$melisTranslation = $this->getServiceLocator()->get('MelisC... | php | public function getTranslationsAction()
{
// Get the current language
$container = new Container('meliscore');
$locale = $container['melis-lang-locale'];
$translator = $this->getServiceLocator()->get('translator');
$melisTranslation = $this->getServiceLocator()->get('MelisC... | [
"public",
"function",
"getTranslationsAction",
"(",
")",
"{",
"// Get the current language",
"$",
"container",
"=",
"new",
"Container",
"(",
"'meliscore'",
")",
";",
"$",
"locale",
"=",
"$",
"container",
"[",
"'melis-lang-locale'",
"]",
";",
"$",
"translator",
"... | Returns a Javascript format of Melis Translations | [
"Returns",
"a",
"Javascript",
"format",
"of",
"Melis",
"Translations"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/LanguageController.php#L132-L165 |
27,336 | melisplatform/melis-core | src/Controller/LanguageController.php | LanguageController.updateLanguageAction | public function updateLanguageAction()
{
$response = array();
$success = 0;
$excludeModules = array('.', '..', '.gitignore', 'MelisSites', 'MelisInstaller');
$textTitle = 'tr_meliscore_header_language_Language';
$textMessage = 'tr_meliscore_tool_language_update_failed';
... | php | public function updateLanguageAction()
{
$response = array();
$success = 0;
$excludeModules = array('.', '..', '.gitignore', 'MelisSites', 'MelisInstaller');
$textTitle = 'tr_meliscore_header_language_Language';
$textMessage = 'tr_meliscore_tool_language_update_failed';
... | [
"public",
"function",
"updateLanguageAction",
"(",
")",
"{",
"$",
"response",
"=",
"array",
"(",
")",
";",
"$",
"success",
"=",
"0",
";",
"$",
"excludeModules",
"=",
"array",
"(",
"'.'",
",",
"'..'",
",",
"'.gitignore'",
",",
"'MelisSites'",
",",
"'Melis... | This allows the selected language to get new translations from melisplatform
@return \Zend\View\Model\JsonModel | [
"This",
"allows",
"the",
"selected",
"language",
"to",
"get",
"new",
"translations",
"from",
"melisplatform"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/LanguageController.php#L605-L660 |
27,337 | melisplatform/melis-core | src/Controller/LanguageController.php | LanguageController.getWarningLogs | private function getWarningLogs()
{
$melisTool = $this->getServiceLocator()->get('MelisCoreTool');
$moduleSvc = $this->getServiceLocator()->get('ModulesService');
$allModules = $moduleSvc->getAllModules();
$excludeModules = ['MelisFront', 'MelisEngine', 'MelisInstaller', 'MelisAsse... | php | private function getWarningLogs()
{
$melisTool = $this->getServiceLocator()->get('MelisCoreTool');
$moduleSvc = $this->getServiceLocator()->get('ModulesService');
$allModules = $moduleSvc->getAllModules();
$excludeModules = ['MelisFront', 'MelisEngine', 'MelisInstaller', 'MelisAsse... | [
"private",
"function",
"getWarningLogs",
"(",
")",
"{",
"$",
"melisTool",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'MelisCoreTool'",
")",
";",
"$",
"moduleSvc",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
... | Returns the possible folder or file issues
@return array | [
"Returns",
"the",
"possible",
"folder",
"or",
"file",
"issues"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/LanguageController.php#L666-L706 |
27,338 | melisplatform/melis-core | src/Service/MelisCoreModulesService.php | MelisCoreModulesService.getModulesAndVersions | public function getModulesAndVersions($moduleName = null)
{
$tmpModules = [];
$repos = $this->getComposer()->getRepositoryManager()->getLocalRepository();
$composerFile = $_SERVER['DOCUMENT_ROOT'] . '/../vendor/composer/installed.json';
$composer = (array) \Zend\Json\Json::decode(fi... | php | public function getModulesAndVersions($moduleName = null)
{
$tmpModules = [];
$repos = $this->getComposer()->getRepositoryManager()->getLocalRepository();
$composerFile = $_SERVER['DOCUMENT_ROOT'] . '/../vendor/composer/installed.json';
$composer = (array) \Zend\Json\Json::decode(fi... | [
"public",
"function",
"getModulesAndVersions",
"(",
"$",
"moduleName",
"=",
"null",
")",
"{",
"$",
"tmpModules",
"=",
"[",
"]",
";",
"$",
"repos",
"=",
"$",
"this",
"->",
"getComposer",
"(",
")",
"->",
"getRepositoryManager",
"(",
")",
"->",
"getLocalRepos... | Returns the module name, module package, and its' version
@param null $moduleName - provide the module name if you want to get the package specific information
@return array | [
"Returns",
"the",
"module",
"name",
"module",
"package",
"and",
"its",
"version"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisCoreModulesService.php#L39-L105 |
27,339 | melisplatform/melis-core | src/Service/MelisCoreModulesService.php | MelisCoreModulesService.getDir | protected function getDir($dir, $excludeSubFolders = [])
{
$directories = [];
if (file_exists($dir)) {
$excludeDir = array_merge(['.', '..', '.gitignore'], $excludeSubFolders);
$directory = array_diff(scandir($dir), $excludeDir);
foreach ($directory as $d) {
... | php | protected function getDir($dir, $excludeSubFolders = [])
{
$directories = [];
if (file_exists($dir)) {
$excludeDir = array_merge(['.', '..', '.gitignore'], $excludeSubFolders);
$directory = array_diff(scandir($dir), $excludeDir);
foreach ($directory as $d) {
... | [
"protected",
"function",
"getDir",
"(",
"$",
"dir",
",",
"$",
"excludeSubFolders",
"=",
"[",
"]",
")",
"{",
"$",
"directories",
"=",
"[",
"]",
";",
"if",
"(",
"file_exists",
"(",
"$",
"dir",
")",
")",
"{",
"$",
"excludeDir",
"=",
"array_merge",
"(",
... | Returns all the sub-folders in the provided path
@param String $dir
@param array $excludeSubFolders
@return array | [
"Returns",
"all",
"the",
"sub",
"-",
"folders",
"in",
"the",
"provided",
"path"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisCoreModulesService.php#L193-L209 |
27,340 | melisplatform/melis-core | src/Service/MelisCoreModulesService.php | MelisCoreModulesService.getVendorModules | public function getVendorModules()
{
$repos = $this->getComposer()->getRepositoryManager()->getLocalRepository();
$packages = array_filter($repos->getPackages(), function ($package) {
/** @var CompletePackage $package */
return $package->getType() === 'melisplatform-module' ... | php | public function getVendorModules()
{
$repos = $this->getComposer()->getRepositoryManager()->getLocalRepository();
$packages = array_filter($repos->getPackages(), function ($package) {
/** @var CompletePackage $package */
return $package->getType() === 'melisplatform-module' ... | [
"public",
"function",
"getVendorModules",
"(",
")",
"{",
"$",
"repos",
"=",
"$",
"this",
"->",
"getComposer",
"(",
")",
"->",
"getRepositoryManager",
"(",
")",
"->",
"getLocalRepository",
"(",
")",
";",
"$",
"packages",
"=",
"array_filter",
"(",
"$",
"repo... | Returns all melisplatform-module packages loaded by composer
@return array | [
"Returns",
"all",
"melisplatform",
"-",
"module",
"packages",
"loaded",
"by",
"composer"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisCoreModulesService.php#L255-L273 |
27,341 | melisplatform/melis-core | src/Service/MelisCoreModulesService.php | MelisCoreModulesService.getChildDependencies | public function getChildDependencies($moduleName, $convertPackageNameToNamespace = true, $getOnlyActiveModules = true)
{
$modules = $this->getAllModules();
$matchModule = $convertPackageNameToNamespace ? $moduleName : $this->convertToPackageName($moduleName);
$dependents = [];
forea... | php | public function getChildDependencies($moduleName, $convertPackageNameToNamespace = true, $getOnlyActiveModules = true)
{
$modules = $this->getAllModules();
$matchModule = $convertPackageNameToNamespace ? $moduleName : $this->convertToPackageName($moduleName);
$dependents = [];
forea... | [
"public",
"function",
"getChildDependencies",
"(",
"$",
"moduleName",
",",
"$",
"convertPackageNameToNamespace",
"=",
"true",
",",
"$",
"getOnlyActiveModules",
"=",
"true",
")",
"{",
"$",
"modules",
"=",
"$",
"this",
"->",
"getAllModules",
"(",
")",
";",
"$",
... | Returns an array of modules or packages that is dependent to the module name provided
@param $moduleName
@param bool $convertPackageNameToNamespace
@param bool $getOnlyActiveModules - returns only the active modules
@return array | [
"Returns",
"an",
"array",
"of",
"modules",
"or",
"packages",
"that",
"is",
"dependent",
"to",
"the",
"module",
"name",
"provided"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisCoreModulesService.php#L284-L313 |
27,342 | melisplatform/melis-core | src/Service/MelisCoreModulesService.php | MelisCoreModulesService.getDependencies | public function getDependencies($moduleName, $convertPackageNameToNamespace = true)
{
$modulePath = $this->getModulePath($moduleName);
$dependencies = [];
if ($modulePath) {
$defaultDependencies = ['melis-core'];
$dependencies = $defaultDependencies;
$co... | php | public function getDependencies($moduleName, $convertPackageNameToNamespace = true)
{
$modulePath = $this->getModulePath($moduleName);
$dependencies = [];
if ($modulePath) {
$defaultDependencies = ['melis-core'];
$dependencies = $defaultDependencies;
$co... | [
"public",
"function",
"getDependencies",
"(",
"$",
"moduleName",
",",
"$",
"convertPackageNameToNamespace",
"=",
"true",
")",
"{",
"$",
"modulePath",
"=",
"$",
"this",
"->",
"getModulePath",
"(",
"$",
"moduleName",
")",
";",
"$",
"dependencies",
"=",
"[",
"]... | Returns the dependencies of the module
@param $moduleName
@param bool $convertPackageNameToNamespace - set to "true" to convert all package name into their actual Module name
@return array | [
"Returns",
"the",
"dependencies",
"of",
"the",
"module"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisCoreModulesService.php#L337-L384 |
27,343 | melisplatform/melis-core | src/Service/MelisCoreModulesService.php | MelisCoreModulesService.getModulePath | public function getModulePath($moduleName, $returnFullPath = true)
{
$path = $this->getUserModulePath($moduleName, $returnFullPath);
if ($path == '') {
$path = $this->getComposerModulePath($moduleName, $returnFullPath);
}
return $path;
} | php | public function getModulePath($moduleName, $returnFullPath = true)
{
$path = $this->getUserModulePath($moduleName, $returnFullPath);
if ($path == '') {
$path = $this->getComposerModulePath($moduleName, $returnFullPath);
}
return $path;
} | [
"public",
"function",
"getModulePath",
"(",
"$",
"moduleName",
",",
"$",
"returnFullPath",
"=",
"true",
")",
"{",
"$",
"path",
"=",
"$",
"this",
"->",
"getUserModulePath",
"(",
"$",
"moduleName",
",",
"$",
"returnFullPath",
")",
";",
"if",
"(",
"$",
"pat... | Returns the full path of the module
@param $moduleName
@param bool $returnFullPath
@return string | [
"Returns",
"the",
"full",
"path",
"of",
"the",
"module"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisCoreModulesService.php#L394-L402 |
27,344 | melisplatform/melis-core | src/Service/MelisCoreModulesService.php | MelisCoreModulesService.getActiveModules | public function getActiveModules($exclude = [])
{
$mm = $this->getServiceLocator()->get('ModuleManager');
$loadedModules = array_keys($mm->getLoadedModules());
$pluginModules = $this->getModulePlugins();
$modules = [];
foreach ($loadedModules as $module) {
if (in_... | php | public function getActiveModules($exclude = [])
{
$mm = $this->getServiceLocator()->get('ModuleManager');
$loadedModules = array_keys($mm->getLoadedModules());
$pluginModules = $this->getModulePlugins();
$modules = [];
foreach ($loadedModules as $module) {
if (in_... | [
"public",
"function",
"getActiveModules",
"(",
"$",
"exclude",
"=",
"[",
"]",
")",
"{",
"$",
"mm",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'ModuleManager'",
")",
";",
"$",
"loadedModules",
"=",
"array_keys",
"(",
"$",
... | Returns all the modules that has been loaded in zend
@param array $exclude
@return array | [
"Returns",
"all",
"the",
"modules",
"that",
"has",
"been",
"loaded",
"in",
"zend"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisCoreModulesService.php#L476-L491 |
27,345 | melisplatform/melis-core | src/Controller/MelisCoreMicroServiceController.php | MelisCoreMicroServiceController.microServicesListAction | public function microServicesListAction()
{
$view = new ViewModel();
$translator = $this->getServiceLocator()->get('translator');
$apiKey = trim($this->params()->fromRoute('api_key', ''));
$userExists = false;
$microservice = array();
$userApiData ... | php | public function microServicesListAction()
{
$view = new ViewModel();
$translator = $this->getServiceLocator()->get('translator');
$apiKey = trim($this->params()->fromRoute('api_key', ''));
$userExists = false;
$microservice = array();
$userApiData ... | [
"public",
"function",
"microServicesListAction",
"(",
")",
"{",
"$",
"view",
"=",
"new",
"ViewModel",
"(",
")",
";",
"$",
"translator",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'translator'",
")",
";",
"$",
"apiKey",
"=",... | generate all available list of Microservices | [
"generate",
"all",
"available",
"list",
"of",
"Microservices"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/MelisCoreMicroServiceController.php#L534-L587 |
27,346 | orchestral/kernel | src/Notifications/Messages/TitleForSubject.php | TitleForSubject.title | public function title(string $title)
{
$name = config('app.name');
if (empty($this->subject) && ! is_null($name)) {
$this->subject(sprintf('[%s] %s', $name, $title));
}
$this->title = $title;
return $this;
} | php | public function title(string $title)
{
$name = config('app.name');
if (empty($this->subject) && ! is_null($name)) {
$this->subject(sprintf('[%s] %s', $name, $title));
}
$this->title = $title;
return $this;
} | [
"public",
"function",
"title",
"(",
"string",
"$",
"title",
")",
"{",
"$",
"name",
"=",
"config",
"(",
"'app.name'",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"subject",
")",
"&&",
"!",
"is_null",
"(",
"$",
"name",
")",
")",
"{",
"$",... | Get the title of the notification.
@param string $title
@return $this | [
"Get",
"the",
"title",
"of",
"the",
"notification",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Notifications/Messages/TitleForSubject.php#L21-L32 |
27,347 | locomotivemtl/charcoal-app | src/Charcoal/App/Handler/HandlerConfig.php | HandlerConfig.setTemplate | public function setTemplate($template)
{
if (empty($template)) {
$this->template = null;
return $this;
}
if (!is_string($template)) {
throw new InvalidArgumentException(
'Handler view template must be a string identifier.'
);
... | php | public function setTemplate($template)
{
if (empty($template)) {
$this->template = null;
return $this;
}
if (!is_string($template)) {
throw new InvalidArgumentException(
'Handler view template must be a string identifier.'
);
... | [
"public",
"function",
"setTemplate",
"(",
"$",
"template",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"template",
")",
")",
"{",
"$",
"this",
"->",
"template",
"=",
"null",
";",
"return",
"$",
"this",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
... | Set the template view.
@param string|null $template The template identifier.
@throws InvalidArgumentException If the template view is invalid.
@return HandlerConfig Chainable | [
"Set",
"the",
"template",
"view",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Handler/HandlerConfig.php#L95-L110 |
27,348 | locomotivemtl/charcoal-app | src/Charcoal/App/Handler/HandlerConfig.php | HandlerConfig.setController | public function setController($controller)
{
if (empty($controller)) {
$this->controller = null;
return $this;
}
if (!is_string($controller)) {
throw new InvalidArgumentException(
'Handler view controller must be a string.'
);
... | php | public function setController($controller)
{
if (empty($controller)) {
$this->controller = null;
return $this;
}
if (!is_string($controller)) {
throw new InvalidArgumentException(
'Handler view controller must be a string.'
);
... | [
"public",
"function",
"setController",
"(",
"$",
"controller",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"controller",
")",
")",
"{",
"$",
"this",
"->",
"controller",
"=",
"null",
";",
"return",
"$",
"this",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
... | Set the template controller.
@param string|null $controller Handler controller name.
@throws InvalidArgumentException If the template controller is invalid.
@return self | [
"Set",
"the",
"template",
"controller",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Handler/HandlerConfig.php#L133-L148 |
27,349 | locomotivemtl/charcoal-app | src/Charcoal/App/Handler/HandlerConfig.php | HandlerConfig.setEngine | public function setEngine($engine)
{
if (empty($engine)) {
$this->engine = null;
return $this;
}
if (!is_string($engine)) {
throw new InvalidArgumentException(
'Engine must be a string (the engine ident)'
);
}
... | php | public function setEngine($engine)
{
if (empty($engine)) {
$this->engine = null;
return $this;
}
if (!is_string($engine)) {
throw new InvalidArgumentException(
'Engine must be a string (the engine ident)'
);
}
... | [
"public",
"function",
"setEngine",
"(",
"$",
"engine",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"engine",
")",
")",
"{",
"$",
"this",
"->",
"engine",
"=",
"null",
";",
"return",
"$",
"this",
";",
"}",
"if",
"(",
"!",
"is_string",
"(",
"$",
"engine... | Set the template rendering engine.
@param string|null $engine The view engine identifier.
@throws InvalidArgumentException If the engine is invalid.
@return self | [
"Set",
"the",
"template",
"rendering",
"engine",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Handler/HandlerConfig.php#L190-L205 |
27,350 | locomotivemtl/charcoal-app | src/Charcoal/App/Handler/TemplateableHandlerTrait.php | TemplateableHandlerTrait.renderHtmlTemplate | protected function renderHtmlTemplate()
{
if ($this->cacheEnabled()) {
$cachePool = $this->container['cache'];
$cacheKey = 'template/'.str_replace('/', '.', $this->cacheIdent());
$cacheItem = $cachePool->getItem($cacheKey);
$output = $cacheItem->get();
... | php | protected function renderHtmlTemplate()
{
if ($this->cacheEnabled()) {
$cachePool = $this->container['cache'];
$cacheKey = 'template/'.str_replace('/', '.', $this->cacheIdent());
$cacheItem = $cachePool->getItem($cacheKey);
$output = $cacheItem->get();
... | [
"protected",
"function",
"renderHtmlTemplate",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"cacheEnabled",
"(",
")",
")",
"{",
"$",
"cachePool",
"=",
"$",
"this",
"->",
"container",
"[",
"'cache'",
"]",
";",
"$",
"cacheKey",
"=",
"'template/'",
".",
"... | Render HTML handler.
@see \Charcoal\App\Route\TemplateRoute::templateContent() Equivalent
@return string | [
"Render",
"HTML",
"handler",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Handler/TemplateableHandlerTrait.php#L42-L61 |
27,351 | locomotivemtl/charcoal-app | src/Charcoal/App/Handler/TemplateableHandlerTrait.php | TemplateableHandlerTrait.renderHtmlTemplateContent | protected function renderHtmlTemplateContent()
{
$config = $this->config();
$factory = $this->templateFactory();
$factory->setDefaultClass($config['default_controller']);
$controller = $factory->create($config['controller']);
$controller->init($this->httpRequest());
... | php | protected function renderHtmlTemplateContent()
{
$config = $this->config();
$factory = $this->templateFactory();
$factory->setDefaultClass($config['default_controller']);
$controller = $factory->create($config['controller']);
$controller->init($this->httpRequest());
... | [
"protected",
"function",
"renderHtmlTemplateContent",
"(",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"config",
"(",
")",
";",
"$",
"factory",
"=",
"$",
"this",
"->",
"templateFactory",
"(",
")",
";",
"$",
"factory",
"->",
"setDefaultClass",
"(",
"... | Render HTML template.
@see \Charcoal\App\Route\TemplateRoute::renderTemplate() Equivalent
@see \Charcoal\App\Route\TemplateRoute::createTemplate() Equivalent
@return string | [
"Render",
"HTML",
"template",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Handler/TemplateableHandlerTrait.php#L70-L87 |
27,352 | locomotivemtl/charcoal-app | src/Charcoal/App/Handler/AbstractError.php | AbstractError.renderHtmlErrorDetails | public function renderHtmlErrorDetails()
{
$error = $this->getThrown();
$html = $this->renderHtmlError($error);
while ($error = $error->getPrevious()) {
$html .= '<h2>'.$this->translator()->translate('Previous error').'</h2>';
$html .= $this->renderHtmlError($error);... | php | public function renderHtmlErrorDetails()
{
$error = $this->getThrown();
$html = $this->renderHtmlError($error);
while ($error = $error->getPrevious()) {
$html .= '<h2>'.$this->translator()->translate('Previous error').'</h2>';
$html .= $this->renderHtmlError($error);... | [
"public",
"function",
"renderHtmlErrorDetails",
"(",
")",
"{",
"$",
"error",
"=",
"$",
"this",
"->",
"getThrown",
"(",
")",
";",
"$",
"html",
"=",
"$",
"this",
"->",
"renderHtmlError",
"(",
"$",
"error",
")",
";",
"while",
"(",
"$",
"error",
"=",
"$"... | Render the HTML error details.
@return string | [
"Render",
"the",
"HTML",
"error",
"details",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Handler/AbstractError.php#L73-L84 |
27,353 | locomotivemtl/charcoal-app | src/Charcoal/App/Handler/AbstractError.php | AbstractError.getMessage | public function getMessage()
{
if ($this->displayErrorDetails() && $this->hasThrown()) {
return $this->getThrown()->getMessage();
} else {
return $this->translator()->translate(
'The server encountered a problem. Sorry for the temporary inconvenience.',
... | php | public function getMessage()
{
if ($this->displayErrorDetails() && $this->hasThrown()) {
return $this->getThrown()->getMessage();
} else {
return $this->translator()->translate(
'The server encountered a problem. Sorry for the temporary inconvenience.',
... | [
"public",
"function",
"getMessage",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"displayErrorDetails",
"(",
")",
"&&",
"$",
"this",
"->",
"hasThrown",
"(",
")",
")",
"{",
"return",
"$",
"this",
"->",
"getThrown",
"(",
")",
"->",
"getMessage",
"(",
"... | Retrieve the handler's message.
@return string | [
"Retrieve",
"the",
"handler",
"s",
"message",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Handler/AbstractError.php#L111-L122 |
27,354 | locomotivemtl/charcoal-app | src/Charcoal/App/Handler/AbstractError.php | AbstractError.logError | protected function logError($message)
{
if ($this->logger instanceof LoggerInterface) {
$this->logger->error($message);
} else {
error_log($message);
}
} | php | protected function logError($message)
{
if ($this->logger instanceof LoggerInterface) {
$this->logger->error($message);
} else {
error_log($message);
}
} | [
"protected",
"function",
"logError",
"(",
"$",
"message",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"logger",
"instanceof",
"LoggerInterface",
")",
"{",
"$",
"this",
"->",
"logger",
"->",
"error",
"(",
"$",
"message",
")",
";",
"}",
"else",
"{",
"error_l... | Wraps the error_log function so that this can be easily tested
@param string $message The message to log.
@return void | [
"Wraps",
"the",
"error_log",
"function",
"so",
"that",
"this",
"can",
"be",
"easily",
"tested"
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Handler/AbstractError.php#L242-L249 |
27,355 | locomotivemtl/charcoal-app | src/Charcoal/App/Handler/AbstractError.php | AbstractError.parseTemplateData | protected function parseTemplateData($data = [])
{
$error = $this->getThrown();
$html = $this->renderHtmlError($error);
while ($error = $error->getPrevious()) {
$html .= '<h2>'.$this->translator()->translate('Previous error').'</h2>';
$html .= $this->renderHtmlError(... | php | protected function parseTemplateData($data = [])
{
$error = $this->getThrown();
$html = $this->renderHtmlError($error);
while ($error = $error->getPrevious()) {
$html .= '<h2>'.$this->translator()->translate('Previous error').'</h2>';
$html .= $this->renderHtmlError(... | [
"protected",
"function",
"parseTemplateData",
"(",
"$",
"data",
"=",
"[",
"]",
")",
"{",
"$",
"error",
"=",
"$",
"this",
"->",
"getThrown",
"(",
")",
";",
"$",
"html",
"=",
"$",
"this",
"->",
"renderHtmlError",
"(",
"$",
"error",
")",
";",
"while",
... | Prepare the template data for rendering.
@param mixed $data Raw template data.
@return array Expanded and processed template data. | [
"Prepare",
"the",
"template",
"data",
"for",
"rendering",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Handler/AbstractError.php#L386-L400 |
27,356 | locomotivemtl/charcoal-app | src/Charcoal/App/Script/ArgScriptTrait.php | ArgScriptTrait.parseAsArray | protected function parseAsArray($var, $delimiter = '[\s,]+')
{
if (is_string($var)) {
if (!is_string($delimiter)) {
throw new InvalidArgumentException('The delimiter must be a string.');
}
$var = preg_split('#(?<!\\\\)'.$delimiter.'#', $var);
}
... | php | protected function parseAsArray($var, $delimiter = '[\s,]+')
{
if (is_string($var)) {
if (!is_string($delimiter)) {
throw new InvalidArgumentException('The delimiter must be a string.');
}
$var = preg_split('#(?<!\\\\)'.$delimiter.'#', $var);
}
... | [
"protected",
"function",
"parseAsArray",
"(",
"$",
"var",
",",
"$",
"delimiter",
"=",
"'[\\s,]+'",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"var",
")",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"delimiter",
")",
")",
"{",
"throw",
"new",
... | Resolve the given value as a collection of values.
If the given value is a string, it will be split.
@param mixed $var An argument to split.
@param string $delimiter The boundary string.
@throws InvalidArgumentException If the value cannot be parsed into an array.
@return array|Traversable | [
"Resolve",
"the",
"given",
"value",
"as",
"a",
"collection",
"of",
"values",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Script/ArgScriptTrait.php#L24-L39 |
27,357 | locomotivemtl/charcoal-app | src/Charcoal/App/Script/ArgScriptTrait.php | ArgScriptTrait.parseArguments | protected function parseArguments()
{
$cli = $this->climate();
$args = $cli->arguments;
$ask = $args->defined('interactive');
$params = $this->arguments();
foreach ($params as $key => $param) {
$setter = $this->setter($key);
if (!is_callable([ $t... | php | protected function parseArguments()
{
$cli = $this->climate();
$args = $cli->arguments;
$ask = $args->defined('interactive');
$params = $this->arguments();
foreach ($params as $key => $param) {
$setter = $this->setter($key);
if (!is_callable([ $t... | [
"protected",
"function",
"parseArguments",
"(",
")",
"{",
"$",
"cli",
"=",
"$",
"this",
"->",
"climate",
"(",
")",
";",
"$",
"args",
"=",
"$",
"cli",
"->",
"arguments",
";",
"$",
"ask",
"=",
"$",
"args",
"->",
"defined",
"(",
"'interactive'",
")",
... | Parse command line arguments into script properties.
@throws RuntimeException If a checkbox/radio argument has no options.
@return self | [
"Parse",
"command",
"line",
"arguments",
"into",
"script",
"properties",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Script/ArgScriptTrait.php#L47-L81 |
27,358 | Magicalex/WriteiniFile | src/ReadiniFile.php | ReadiniFile.get | public static function get($ini_file, $scanner_mode = INI_SCANNER_RAW)
{
self::$path_to_ini_file = $ini_file;
if (file_exists(self::$path_to_ini_file) === true) {
self::$data_ini_file = @parse_ini_file(self::$path_to_ini_file, true, $scanner_mode);
} else {
throw new... | php | public static function get($ini_file, $scanner_mode = INI_SCANNER_RAW)
{
self::$path_to_ini_file = $ini_file;
if (file_exists(self::$path_to_ini_file) === true) {
self::$data_ini_file = @parse_ini_file(self::$path_to_ini_file, true, $scanner_mode);
} else {
throw new... | [
"public",
"static",
"function",
"get",
"(",
"$",
"ini_file",
",",
"$",
"scanner_mode",
"=",
"INI_SCANNER_RAW",
")",
"{",
"self",
"::",
"$",
"path_to_ini_file",
"=",
"$",
"ini_file",
";",
"if",
"(",
"file_exists",
"(",
"self",
"::",
"$",
"path_to_ini_file",
... | method for get data of ini file.
@param string $ini_file path of ini file
@param int $scanner_mode scanner mode INI_SCANNER_RAW INI_SCANNER_TYPED or INI_SCANNER_NORMAL
@return array ini file data in a array | [
"method",
"for",
"get",
"data",
"of",
"ini",
"file",
"."
] | 19fe9bd3041219fecdd63e1f0ae14f86cb6800cb | https://github.com/Magicalex/WriteiniFile/blob/19fe9bd3041219fecdd63e1f0ae14f86cb6800cb/src/ReadiniFile.php#L28-L43 |
27,359 | orchestral/kernel | src/Publisher/MigrateManager.php | MigrateManager.createMigrationRepository | protected function createMigrationRepository(): void
{
$repository = $this->migrator->getRepository();
if (! $repository->repositoryExists()) {
$repository->createRepository();
}
} | php | protected function createMigrationRepository(): void
{
$repository = $this->migrator->getRepository();
if (! $repository->repositoryExists()) {
$repository->createRepository();
}
} | [
"protected",
"function",
"createMigrationRepository",
"(",
")",
":",
"void",
"{",
"$",
"repository",
"=",
"$",
"this",
"->",
"migrator",
"->",
"getRepository",
"(",
")",
";",
"if",
"(",
"!",
"$",
"repository",
"->",
"repositoryExists",
"(",
")",
")",
"{",
... | Create migration repository if it's not available.
@return void | [
"Create",
"migration",
"repository",
"if",
"it",
"s",
"not",
"available",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Publisher/MigrateManager.php#L42-L49 |
27,360 | melisplatform/melis-core | src/Controller/ToolUserController.php | ToolUserController.renderToolUserAction | public function renderToolUserAction()
{
$translator = $this->getServiceLocator()->get('translator');
$melisKey = $this->params()->fromRoute('melisKey', '');
$noAccessPrompt = 'tr_meliscore_no_access_to_tool';
$hasAccess = $this->hasAccess($this::TOOL_KEY);
if(!$hasAccess) {... | php | public function renderToolUserAction()
{
$translator = $this->getServiceLocator()->get('translator');
$melisKey = $this->params()->fromRoute('melisKey', '');
$noAccessPrompt = 'tr_meliscore_no_access_to_tool';
$hasAccess = $this->hasAccess($this::TOOL_KEY);
if(!$hasAccess) {... | [
"public",
"function",
"renderToolUserAction",
"(",
")",
"{",
"$",
"translator",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'translator'",
")",
";",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRou... | Renders the main container of the tool
@return \Zend\View\Model\ViewModel | [
"Renders",
"the",
"main",
"container",
"of",
"the",
"tool"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ToolUserController.php#L30-L52 |
27,361 | melisplatform/melis-core | src/Controller/ToolUserController.php | ToolUserController.renderToolUserContentAction | public function renderToolUserContentAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$melisTranslation = $this->getServiceLocator()->get('MelisCoreTranslation');
$melisTool = $this->getServiceLocator()->get('MelisCoreTool');
$translator = $this->getServiceLocator()... | php | public function renderToolUserContentAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$melisTranslation = $this->getServiceLocator()->get('MelisCoreTranslation');
$melisTool = $this->getServiceLocator()->get('MelisCoreTool');
$translator = $this->getServiceLocator()... | [
"public",
"function",
"renderToolUserContentAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"$",
"melisTranslation",
"=",
"$",
"this",
"->",
"getServiceLocator",
... | Renders the content of the tool
@return \Zend\View\Model\ViewModel | [
"Renders",
"the",
"content",
"of",
"the",
"tool"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ToolUserController.php#L118-L155 |
27,362 | melisplatform/melis-core | src/Controller/ToolUserController.php | ToolUserController.renderToolUserModalHandlerNewAction | public function renderToolUserModalHandlerNewAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
// declare the Tool service that we will be using to completely create our tool.
$melisTool = $this->getServiceLocator()->get('MelisCoreTool');
// tell the Tool what conf... | php | public function renderToolUserModalHandlerNewAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
// declare the Tool service that we will be using to completely create our tool.
$melisTool = $this->getServiceLocator()->get('MelisCoreTool');
// tell the Tool what conf... | [
"public",
"function",
"renderToolUserModalHandlerNewAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"// declare the Tool service that we will be using to completely create ou... | Handles the rights if Add Modal Content should be displayed for the user
@return \Zend\View\Model\ViewModel | [
"Handles",
"the",
"rights",
"if",
"Add",
"Modal",
"Content",
"should",
"be",
"displayed",
"for",
"the",
"user"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ToolUserController.php#L225-L240 |
27,363 | melisplatform/melis-core | src/Controller/ToolUserController.php | ToolUserController.renderTooluserModalNewAction | public function renderTooluserModalNewAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
// declare the Tool service that we will be using to completely create our tool.
$melisTool = $this->getServiceLocator()->get('MelisCoreTool');
// tell the Tool what configurati... | php | public function renderTooluserModalNewAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
// declare the Tool service that we will be using to completely create our tool.
$melisTool = $this->getServiceLocator()->get('MelisCoreTool');
// tell the Tool what configurati... | [
"public",
"function",
"renderTooluserModalNewAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"// declare the Tool service that we will be using to completely create our tool.... | Renders to the New Form content for the modal
@return \Zend\View\Model\ViewModel | [
"Renders",
"to",
"the",
"New",
"Form",
"content",
"for",
"the",
"modal"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ToolUserController.php#L246-L262 |
27,364 | melisplatform/melis-core | src/Controller/ToolUserController.php | ToolUserController.renderToolUserModalHandlerNewRightsAction | public function renderToolUserModalHandlerNewRightsAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
// declare the Tool service that we will be using to completely create our tool.
$melisTool = $this->getServiceLocator()->get('MelisCoreTool');
// tell the Tool wha... | php | public function renderToolUserModalHandlerNewRightsAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
// declare the Tool service that we will be using to completely create our tool.
$melisTool = $this->getServiceLocator()->get('MelisCoreTool');
// tell the Tool wha... | [
"public",
"function",
"renderToolUserModalHandlerNewRightsAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"// declare the Tool service that we will be using to completely cre... | Handles the rights if New User Content should be displayed for the user
@return \Zend\View\Model\ViewModel | [
"Handles",
"the",
"rights",
"if",
"New",
"User",
"Content",
"should",
"be",
"displayed",
"for",
"the",
"user"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ToolUserController.php#L334-L349 |
27,365 | melisplatform/melis-core | src/Controller/ToolUserController.php | ToolUserController.renderToolUserModalRightsAction | public function renderToolUserModalRightsAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$view = new ViewModel();
$view->melisKey = $melisKey;
return $view;
} | php | public function renderToolUserModalRightsAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$view = new ViewModel();
$view->melisKey = $melisKey;
return $view;
} | [
"public",
"function",
"renderToolUserModalRightsAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"$",
"view",
"=",
"new",
"ViewModel",
"(",
")",
";",
"$",
"v... | Renders to the Edit Rights Form content for the modal
@return \Zend\View\Model\ViewModel | [
"Renders",
"to",
"the",
"Edit",
"Rights",
"Form",
"content",
"for",
"the",
"modal"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ToolUserController.php#L356-L365 |
27,366 | melisplatform/melis-core | src/Controller/ToolUserController.php | ToolUserController.renderToolUserModalNewRightsAction | public function renderToolUserModalNewRightsAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$view = new ViewModel();
$view->melisKey = $melisKey;
return $view;
} | php | public function renderToolUserModalNewRightsAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$view = new ViewModel();
$view->melisKey = $melisKey;
return $view;
} | [
"public",
"function",
"renderToolUserModalNewRightsAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"$",
"view",
"=",
"new",
"ViewModel",
"(",
")",
";",
"$",
... | Renders to the New Rights Form content for the modal
@return \Zend\View\Model\ViewModel | [
"Renders",
"to",
"the",
"New",
"Rights",
"Form",
"content",
"for",
"the",
"modal"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ToolUserController.php#L371-L380 |
27,367 | melisplatform/melis-core | src/Controller/ToolUserController.php | ToolUserController.addNewUserAction | public function addNewUserAction()
{
$container = new Container('meliscore');
$response = [];
$this->getEventManager()->trigger('meliscore_tooluser_savenew_start', $this, $response);
$melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$appConfigForm = $mel... | php | public function addNewUserAction()
{
$container = new Container('meliscore');
$response = [];
$this->getEventManager()->trigger('meliscore_tooluser_savenew_start', $this, $response);
$melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$appConfigForm = $mel... | [
"public",
"function",
"addNewUserAction",
"(",
")",
"{",
"$",
"container",
"=",
"new",
"Container",
"(",
"'meliscore'",
")",
";",
"$",
"response",
"=",
"[",
"]",
";",
"$",
"this",
"->",
"getEventManager",
"(",
")",
"->",
"trigger",
"(",
"'meliscore_tooluse... | Adds a new user to the database
@return JsonModel | [
"Adds",
"a",
"new",
"user",
"to",
"the",
"database"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ToolUserController.php#L439-L505 |
27,368 | melisplatform/melis-core | src/Controller/ToolUserController.php | ToolUserController.deleteUserAction | public function deleteUserAction()
{
$response = array();
$this->getEventManager()->trigger('meliscore_tooluser_delete_start', $this, $response);
$translator = $this->getServiceLocator()->get('translator');
$id = null;
$success = 0;
$textTitle = 'tr_meliscore_tool_us... | php | public function deleteUserAction()
{
$response = array();
$this->getEventManager()->trigger('meliscore_tooluser_delete_start', $this, $response);
$translator = $this->getServiceLocator()->get('translator');
$id = null;
$success = 0;
$textTitle = 'tr_meliscore_tool_us... | [
"public",
"function",
"deleteUserAction",
"(",
")",
"{",
"$",
"response",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->",
"getEventManager",
"(",
")",
"->",
"trigger",
"(",
"'meliscore_tooluser_delete_start'",
",",
"$",
"this",
",",
"$",
"response",
")",
"... | Handles the Delete User event
@return \Zend\View\Model\JsonModel | [
"Handles",
"the",
"Delete",
"User",
"event"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ToolUserController.php#L676-L708 |
27,369 | melisplatform/melis-core | src/Controller/ToolUserController.php | ToolUserController.updateUserAction | public function updateUserAction()
{
$response = [];
$this->getEventManager()->trigger('meliscore_tooluser_save_start', $this, $response);
$container = new Container('meliscore');
$melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$appConfigForm = $melis... | php | public function updateUserAction()
{
$response = [];
$this->getEventManager()->trigger('meliscore_tooluser_save_start', $this, $response);
$container = new Container('meliscore');
$melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$appConfigForm = $melis... | [
"public",
"function",
"updateUserAction",
"(",
")",
"{",
"$",
"response",
"=",
"[",
"]",
";",
"$",
"this",
"->",
"getEventManager",
"(",
")",
"->",
"trigger",
"(",
"'meliscore_tooluser_save_start'",
",",
"$",
"this",
",",
"$",
"response",
")",
";",
"$",
... | Saves user account details
@return JsonModel | [
"Saves",
"user",
"account",
"details"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/ToolUserController.php#L1212-L1280 |
27,370 | locomotivemtl/charcoal-app | src/Charcoal/App/Script/AbstractScript.php | AbstractScript.input | protected function input($name)
{
$cli = $this->climate();
$arg = $this->argument($name);
if ($arg) {
$type = (isset($arg['inputType']) ? $arg['inputType'] : 'input');
if (isset($arg['prompt'])) {
$label = $arg['prompt'];
} elseif (isset(... | php | protected function input($name)
{
$cli = $this->climate();
$arg = $this->argument($name);
if ($arg) {
$type = (isset($arg['inputType']) ? $arg['inputType'] : 'input');
if (isset($arg['prompt'])) {
$label = $arg['prompt'];
} elseif (isset(... | [
"protected",
"function",
"input",
"(",
"$",
"name",
")",
"{",
"$",
"cli",
"=",
"$",
"this",
"->",
"climate",
"(",
")",
";",
"$",
"arg",
"=",
"$",
"this",
"->",
"argument",
"(",
"$",
"name",
")",
";",
"if",
"(",
"$",
"arg",
")",
"{",
"$",
"typ... | Request a value from the user for the given argument.
@param string $name An argument identifier.
@throws RuntimeException If a radio or checkbox prompt has no options.
@return mixed Returns the prompt value. | [
"Request",
"a",
"value",
"from",
"the",
"user",
"for",
"the",
"given",
"argument",
"."
] | d25bdab08d40dda83c71b770c59e3b469e0ebfbc | https://github.com/locomotivemtl/charcoal-app/blob/d25bdab08d40dda83c71b770c59e3b469e0ebfbc/src/Charcoal/App/Script/AbstractScript.php#L430-L501 |
27,371 | orchestral/kernel | src/Routing/Concerns/ControllerResponse.php | ControllerResponse.redirectWithMessage | public function redirectWithMessage(
string $to,
?string $message = null,
string $type = 'success'
): RedirectResponse {
return \redirect_with_message($to, $message, $type);
} | php | public function redirectWithMessage(
string $to,
?string $message = null,
string $type = 'success'
): RedirectResponse {
return \redirect_with_message($to, $message, $type);
} | [
"public",
"function",
"redirectWithMessage",
"(",
"string",
"$",
"to",
",",
"?",
"string",
"$",
"message",
"=",
"null",
",",
"string",
"$",
"type",
"=",
"'success'",
")",
":",
"RedirectResponse",
"{",
"return",
"\\",
"redirect_with_message",
"(",
"$",
"to",
... | Queue notification and redirect.
@param string $to
@param string|null $message
@param string $type
@return \Illuminate\Http\RedirectResponse | [
"Queue",
"notification",
"and",
"redirect",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Routing/Concerns/ControllerResponse.php#L20-L26 |
27,372 | orchestral/kernel | src/Publisher/CommandServiceProvider.php | CommandServiceProvider.registerAssetPublishCommand | protected function registerAssetPublishCommand(): void
{
$this->app->singleton('command.asset.publish', function (Application $app) {
return new AssetPublishCommand($app->make('asset.publisher'));
});
} | php | protected function registerAssetPublishCommand(): void
{
$this->app->singleton('command.asset.publish', function (Application $app) {
return new AssetPublishCommand($app->make('asset.publisher'));
});
} | [
"protected",
"function",
"registerAssetPublishCommand",
"(",
")",
":",
"void",
"{",
"$",
"this",
"->",
"app",
"->",
"singleton",
"(",
"'command.asset.publish'",
",",
"function",
"(",
"Application",
"$",
"app",
")",
"{",
"return",
"new",
"AssetPublishCommand",
"(... | Register the asset publish console command.
@return void | [
"Register",
"the",
"asset",
"publish",
"console",
"command",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Publisher/CommandServiceProvider.php#L122-L127 |
27,373 | orchestral/kernel | src/Publisher/CommandServiceProvider.php | CommandServiceProvider.registerConfigPublishCommand | protected function registerConfigPublishCommand(): void
{
$this->app->singleton('command.config.publish', function (Application $app) {
return new ConfigPublishCommand($app->make('config.publisher'));
});
} | php | protected function registerConfigPublishCommand(): void
{
$this->app->singleton('command.config.publish', function (Application $app) {
return new ConfigPublishCommand($app->make('config.publisher'));
});
} | [
"protected",
"function",
"registerConfigPublishCommand",
"(",
")",
":",
"void",
"{",
"$",
"this",
"->",
"app",
"->",
"singleton",
"(",
"'command.config.publish'",
",",
"function",
"(",
"Application",
"$",
"app",
")",
"{",
"return",
"new",
"ConfigPublishCommand",
... | Register the configuration publish console command.
@return void | [
"Register",
"the",
"configuration",
"publish",
"console",
"command",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Publisher/CommandServiceProvider.php#L134-L139 |
27,374 | orchestral/kernel | src/Publisher/CommandServiceProvider.php | CommandServiceProvider.registerViewPublishCommand | protected function registerViewPublishCommand(): void
{
$this->app->singleton('command.view.publish', function (Application $app) {
return new ViewPublishCommand($app->make('view.publisher'));
});
} | php | protected function registerViewPublishCommand(): void
{
$this->app->singleton('command.view.publish', function (Application $app) {
return new ViewPublishCommand($app->make('view.publisher'));
});
} | [
"protected",
"function",
"registerViewPublishCommand",
"(",
")",
":",
"void",
"{",
"$",
"this",
"->",
"app",
"->",
"singleton",
"(",
"'command.view.publish'",
",",
"function",
"(",
"Application",
"$",
"app",
")",
"{",
"return",
"new",
"ViewPublishCommand",
"(",
... | Register the view publish console command.
@return void | [
"Register",
"the",
"view",
"publish",
"console",
"command",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Publisher/CommandServiceProvider.php#L146-L151 |
27,375 | orchestral/kernel | src/Config/NamespacedItemResolver.php | NamespacedItemResolver.parsePackageSegments | protected function parsePackageSegments($key, $namespace, $item)
{
$itemSegments = explode('.', $item);
// If the configuration file doesn't exist for the given package group we can
// assume that we should implicitly use the config file matching the name
// of the namespace. Genera... | php | protected function parsePackageSegments($key, $namespace, $item)
{
$itemSegments = explode('.', $item);
// If the configuration file doesn't exist for the given package group we can
// assume that we should implicitly use the config file matching the name
// of the namespace. Genera... | [
"protected",
"function",
"parsePackageSegments",
"(",
"$",
"key",
",",
"$",
"namespace",
",",
"$",
"item",
")",
"{",
"$",
"itemSegments",
"=",
"explode",
"(",
"'.'",
",",
"$",
"item",
")",
";",
"// If the configuration file doesn't exist for the given package group ... | Parse the segments of a package namespace.
@param string $key
@param string $namespace
@param string $item
@return array | [
"Parse",
"the",
"segments",
"of",
"a",
"package",
"namespace",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Config/NamespacedItemResolver.php#L92-L104 |
27,376 | chillerlan/php-authenticator | src/Authenticator.php | Authenticator.getUri | public function getUri(string $label, string $issuer, int $hotpCounter = null):string{
$values = [
'secret' => $this->getSecret(),
'issuer' => $issuer,
'digits' => $this->options->digits,
'algorithm' => $this->options->algorithm,
];
if($this->options->mode === 'totp'){
$values['period'] ... | php | public function getUri(string $label, string $issuer, int $hotpCounter = null):string{
$values = [
'secret' => $this->getSecret(),
'issuer' => $issuer,
'digits' => $this->options->digits,
'algorithm' => $this->options->algorithm,
];
if($this->options->mode === 'totp'){
$values['period'] ... | [
"public",
"function",
"getUri",
"(",
"string",
"$",
"label",
",",
"string",
"$",
"issuer",
",",
"int",
"$",
"hotpCounter",
"=",
"null",
")",
":",
"string",
"{",
"$",
"values",
"=",
"[",
"'secret'",
"=>",
"$",
"this",
"->",
"getSecret",
"(",
")",
",",... | Creates an URI for use in QR codes for example
@link https://github.com/google/google-authenticator/wiki/Key-Uri-Format#parameters
@param string $label
@param string $issuer
@param int|null $hotpCounter
@return string | [
"Creates",
"an",
"URI",
"for",
"use",
"in",
"QR",
"codes",
"for",
"example"
] | 3d13f35038c4a71e9e101110f821ca7e0679f5ea | https://github.com/chillerlan/php-authenticator/blob/3d13f35038c4a71e9e101110f821ca7e0679f5ea/src/Authenticator.php#L206-L224 |
27,377 | melisplatform/melis-core | src/Service/MelisCoreFlashMessengerService.php | MelisCoreFlashMessengerService.getFlashMessengerMessages | public function getFlashMessengerMessages()
{
$this->fmContainer = new Container('fms');
$flashMessages = $this->fmContainer->flashMessages;
if(!empty($flashMessages))
{
$flashMessages = array_reverse($flashMessages);
}
return Json::enco... | php | public function getFlashMessengerMessages()
{
$this->fmContainer = new Container('fms');
$flashMessages = $this->fmContainer->flashMessages;
if(!empty($flashMessages))
{
$flashMessages = array_reverse($flashMessages);
}
return Json::enco... | [
"public",
"function",
"getFlashMessengerMessages",
"(",
")",
"{",
"$",
"this",
"->",
"fmContainer",
"=",
"new",
"Container",
"(",
"'fms'",
")",
";",
"$",
"flashMessages",
"=",
"$",
"this",
"->",
"fmContainer",
"->",
"flashMessages",
";",
"if",
"(",
"!",
"e... | Returns all the messages stored in Melis Flash Messenger
@return Json | [
"Returns",
"all",
"the",
"messages",
"stored",
"in",
"Melis",
"Flash",
"Messenger"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisCoreFlashMessengerService.php#L102-L113 |
27,378 | melisplatform/melis-core | src/Controller/TreeToolsController.php | TreeToolsController.moveToolsToOthersCategory | private function moveToolsToOthersCategory(): array
{
$leftMenu = $this->getConfig()->getItem('meliscore/interface/meliscore_leftmenu/interface');
$mergeToOthers = [];
foreach ($leftMenu as $melisKey => $item) {
if (!in_array($melisKey, $this->getAllowedLeftMenuConfig())) {
... | php | private function moveToolsToOthersCategory(): array
{
$leftMenu = $this->getConfig()->getItem('meliscore/interface/meliscore_leftmenu/interface');
$mergeToOthers = [];
foreach ($leftMenu as $melisKey => $item) {
if (!in_array($melisKey, $this->getAllowedLeftMenuConfig())) {
... | [
"private",
"function",
"moveToolsToOthersCategory",
"(",
")",
":",
"array",
"{",
"$",
"leftMenu",
"=",
"$",
"this",
"->",
"getConfig",
"(",
")",
"->",
"getItem",
"(",
"'meliscore/interface/meliscore_leftmenu/interface'",
")",
";",
"$",
"mergeToOthers",
"=",
"[",
... | Retrieves all configuration under left menu configuration
with an exception to those allowable left menu configurations
@return array | [
"Retrieves",
"all",
"configuration",
"under",
"left",
"menu",
"configuration",
"with",
"an",
"exception",
"to",
"those",
"allowable",
"left",
"menu",
"configurations"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/TreeToolsController.php#L208-L220 |
27,379 | orchestral/kernel | src/Routing/VersionedHelpers.php | VersionedHelpers.transform | protected function transform($instance, string $transformer, ?string $serializer = null, array $options = [])
{
if (\is_null($serializer)) {
$serializer = $transformer;
}
return $this->serializeWith(
$this->transformWith($instance, $transformer, $options),
... | php | protected function transform($instance, string $transformer, ?string $serializer = null, array $options = [])
{
if (\is_null($serializer)) {
$serializer = $transformer;
}
return $this->serializeWith(
$this->transformWith($instance, $transformer, $options),
... | [
"protected",
"function",
"transform",
"(",
"$",
"instance",
",",
"string",
"$",
"transformer",
",",
"?",
"string",
"$",
"serializer",
"=",
"null",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"\\",
"is_null",
"(",
"$",
"serializer"... | Transform and serialize the instance.
@param \Orchestra\Model\Eloquent|\Illuminate\Support\Collection $instance
@param string $transformer
@param string|null $serializer
@param array $options
@return array | [
"Transform",
"and",
"serialize",
"the",
"instance",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Routing/VersionedHelpers.php#L23-L34 |
27,380 | orchestral/kernel | src/Routing/VersionedHelpers.php | VersionedHelpers.processWith | protected function processWith($instance, string $name, string $method, ...$parameters)
{
$processor = $this->getVersionedResourceClassName('Processors', $name);
return \app($processor)->{$method}($this, $instance, ...$parameters);
} | php | protected function processWith($instance, string $name, string $method, ...$parameters)
{
$processor = $this->getVersionedResourceClassName('Processors', $name);
return \app($processor)->{$method}($this, $instance, ...$parameters);
} | [
"protected",
"function",
"processWith",
"(",
"$",
"instance",
",",
"string",
"$",
"name",
",",
"string",
"$",
"method",
",",
"...",
"$",
"parameters",
")",
"{",
"$",
"processor",
"=",
"$",
"this",
"->",
"getVersionedResourceClassName",
"(",
"'Processors'",
"... | Process the instance.
@param \Orchestra\Model\Eloquent|\Illuminate\Support\Collection $instance
@param string $name
@param string $method
@param mixed $parameters
@return mixed | [
"Process",
"the",
"instance",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Routing/VersionedHelpers.php#L46-L51 |
27,381 | orchestral/kernel | src/Routing/VersionedHelpers.php | VersionedHelpers.transformWith | protected function transformWith($instance, string $name, array $options = [])
{
$transformer = $this->getVersionedResourceClassName('Transformers', $name);
if (\class_exists($transformer)) {
$transformer = \resolve($transformer);
if ($transformer instanceof Transformer) {
... | php | protected function transformWith($instance, string $name, array $options = [])
{
$transformer = $this->getVersionedResourceClassName('Transformers', $name);
if (\class_exists($transformer)) {
$transformer = \resolve($transformer);
if ($transformer instanceof Transformer) {
... | [
"protected",
"function",
"transformWith",
"(",
"$",
"instance",
",",
"string",
"$",
"name",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"transformer",
"=",
"$",
"this",
"->",
"getVersionedResourceClassName",
"(",
"'Transformers'",
",",
"$",
... | Transform the instance.
@param \Orchestra\Model\Eloquent|\Illuminate\Support\Collection $instance
@param string $name
@param array $options
@return mixed | [
"Transform",
"the",
"instance",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Routing/VersionedHelpers.php#L62-L81 |
27,382 | orchestral/kernel | src/Routing/VersionedHelpers.php | VersionedHelpers.serializeWith | protected function serializeWith($instance, string $name)
{
$serializer = $this->getVersionedResourceClassName('Serializers', $name);
if (\class_exists($serializer)) {
return \call_user_func(app($serializer), $instance);
}
if ($instance instanceof Fluent) {
... | php | protected function serializeWith($instance, string $name)
{
$serializer = $this->getVersionedResourceClassName('Serializers', $name);
if (\class_exists($serializer)) {
return \call_user_func(app($serializer), $instance);
}
if ($instance instanceof Fluent) {
... | [
"protected",
"function",
"serializeWith",
"(",
"$",
"instance",
",",
"string",
"$",
"name",
")",
"{",
"$",
"serializer",
"=",
"$",
"this",
"->",
"getVersionedResourceClassName",
"(",
"'Serializers'",
",",
"$",
"name",
")",
";",
"if",
"(",
"\\",
"class_exists... | Serialize the instance.
@param mixed $instance
@param string $name
@return array | [
"Serialize",
"the",
"instance",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Routing/VersionedHelpers.php#L91-L108 |
27,383 | orchestral/kernel | src/Config/FileLoader.php | FileLoader.cascadePackage | public function cascadePackage(string $env, string $package, string $group, array $items): array
{
// First we will look for a configuration file in the packages configuration
// folder. If it exists, we will load it and merge it with these original
// options so that we will easily "cascade... | php | public function cascadePackage(string $env, string $package, string $group, array $items): array
{
// First we will look for a configuration file in the packages configuration
// folder. If it exists, we will load it and merge it with these original
// options so that we will easily "cascade... | [
"public",
"function",
"cascadePackage",
"(",
"string",
"$",
"env",
",",
"string",
"$",
"package",
",",
"string",
"$",
"group",
",",
"array",
"$",
"items",
")",
":",
"array",
"{",
"// First we will look for a configuration file in the packages configuration",
"// folde... | Apply any cascades to an array of package options.
@param string $env
@param string $package
@param string $group
@param array $items
@return array | [
"Apply",
"any",
"cascades",
"to",
"an",
"array",
"of",
"package",
"options",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Config/FileLoader.php#L151-L172 |
27,384 | orchestral/kernel | src/Config/FileLoader.php | FileLoader.getPackagePath | protected function getPackagePath(string $env, string $package, string $group): string
{
$file = "packages/{$package}/{$env}/{$group}.php";
return $this->defaultPath.'/'.$file;
} | php | protected function getPackagePath(string $env, string $package, string $group): string
{
$file = "packages/{$package}/{$env}/{$group}.php";
return $this->defaultPath.'/'.$file;
} | [
"protected",
"function",
"getPackagePath",
"(",
"string",
"$",
"env",
",",
"string",
"$",
"package",
",",
"string",
"$",
"group",
")",
":",
"string",
"{",
"$",
"file",
"=",
"\"packages/{$package}/{$env}/{$group}.php\"",
";",
"return",
"$",
"this",
"->",
"defau... | Get the package path for an environment and group.
@param string $env
@param string $package
@param string $group
@return string | [
"Get",
"the",
"package",
"path",
"for",
"an",
"environment",
"and",
"group",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Config/FileLoader.php#L183-L188 |
27,385 | orchestral/kernel | src/Config/FileLoader.php | FileLoader.getPath | protected function getPath(?string $namespace): ?string
{
if (\is_null($namespace)) {
return $this->defaultPath;
} elseif (isset($this->hints[$namespace])) {
return $this->hints[$namespace];
}
return null;
} | php | protected function getPath(?string $namespace): ?string
{
if (\is_null($namespace)) {
return $this->defaultPath;
} elseif (isset($this->hints[$namespace])) {
return $this->hints[$namespace];
}
return null;
} | [
"protected",
"function",
"getPath",
"(",
"?",
"string",
"$",
"namespace",
")",
":",
"?",
"string",
"{",
"if",
"(",
"\\",
"is_null",
"(",
"$",
"namespace",
")",
")",
"{",
"return",
"$",
"this",
"->",
"defaultPath",
";",
"}",
"elseif",
"(",
"isset",
"(... | Get the configuration path for a namespace.
@param string|null $namespace
@return string|null | [
"Get",
"the",
"configuration",
"path",
"for",
"a",
"namespace",
"."
] | d4ebf0604e9aba6fe30813bc3446305157d93eb4 | https://github.com/orchestral/kernel/blob/d4ebf0604e9aba6fe30813bc3446305157d93eb4/src/Config/FileLoader.php#L197-L206 |
27,386 | melisplatform/melis-core | public/js/filemanager/uploader/jupload.php | JUpload.tobytes | private function tobytes($val) {
$val = trim($val);
$last = fix_strtolower($val{strlen($val)-1});
switch($last) {
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
} | php | private function tobytes($val) {
$val = trim($val);
$last = fix_strtolower($val{strlen($val)-1});
switch($last) {
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
} | [
"private",
"function",
"tobytes",
"(",
"$",
"val",
")",
"{",
"$",
"val",
"=",
"trim",
"(",
"$",
"val",
")",
";",
"$",
"last",
"=",
"fix_strtolower",
"(",
"$",
"val",
"{",
"strlen",
"(",
"$",
"val",
")",
"-",
"1",
"}",
")",
";",
"switch",
"(",
... | Convert a value ending in 'G','M' or 'K' to bytes | [
"Convert",
"a",
"value",
"ending",
"in",
"G",
"M",
"or",
"K",
"to",
"bytes"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/public/js/filemanager/uploader/jupload.php#L240-L252 |
27,387 | melisplatform/melis-core | public/js/filemanager/uploader/jupload.php | JUpload.str_applet | private function str_applet() {
$N = "\n";
$params = $this->appletparams;
// return the actual applet tag
$ret = '<object classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"'.$N;
$ret .= ' codebase = "http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=5,0,0,3"'.$N;
$ret .= ' width =... | php | private function str_applet() {
$N = "\n";
$params = $this->appletparams;
// return the actual applet tag
$ret = '<object classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"'.$N;
$ret .= ' codebase = "http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=5,0,0,3"'.$N;
$ret .= ' width =... | [
"private",
"function",
"str_applet",
"(",
")",
"{",
"$",
"N",
"=",
"\"\\n\"",
";",
"$",
"params",
"=",
"$",
"this",
"->",
"appletparams",
";",
"// return the actual applet tag",
"$",
"ret",
"=",
"'<object classid = \"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"'",
"."... | Build a string, containing the applet tag with all parameters.
@return A string, containing the applet tag | [
"Build",
"a",
"string",
"containing",
"the",
"applet",
"tag",
"with",
"all",
"parameters",
"."
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/public/js/filemanager/uploader/jupload.php#L284-L310 |
27,388 | melisplatform/melis-core | public/js/filemanager/uploader/jupload.php | JUpload.defaultAfterUploadManagement | public function defaultAfterUploadManagement() {
$flist = '[defaultAfterUploadManagement] Nb uploaded files is: ' . sizeof($this->files);
$flist = $this->classparams['http_flist_start'];
foreach ($this->files as $f) {
//$f is an array, that contains all info about the uploaded file.
$this->logDebug('default... | php | public function defaultAfterUploadManagement() {
$flist = '[defaultAfterUploadManagement] Nb uploaded files is: ' . sizeof($this->files);
$flist = $this->classparams['http_flist_start'];
foreach ($this->files as $f) {
//$f is an array, that contains all info about the uploaded file.
$this->logDebug('default... | [
"public",
"function",
"defaultAfterUploadManagement",
"(",
")",
"{",
"$",
"flist",
"=",
"'[defaultAfterUploadManagement] Nb uploaded files is: '",
".",
"sizeof",
"(",
"$",
"this",
"->",
"files",
")",
";",
"$",
"flist",
"=",
"$",
"this",
"->",
"classparams",
"[",
... | Example function to process the files uploaded. This one simply displays the files' data. | [
"Example",
"function",
"to",
"process",
"the",
"files",
"uploaded",
".",
"This",
"one",
"simply",
"displays",
"the",
"files",
"data",
"."
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/public/js/filemanager/uploader/jupload.php#L424-L459 |
27,389 | melisplatform/melis-core | public/js/filemanager/uploader/jupload.php | JUpload.receive_debug_log | private function receive_debug_log() {
// handle error report
if (isset($_POST['description']) && isset($_POST['log'])) {
$msg = $_POST['log'];
mail($this->classparams['errormail'], $_POST['description'], $msg);
} else {
if (isset($_SERVER['SERVER_ADMIN']))
mail($_SERVER['SERVER_ADMIN'], 'Empty jupload error... | php | private function receive_debug_log() {
// handle error report
if (isset($_POST['description']) && isset($_POST['log'])) {
$msg = $_POST['log'];
mail($this->classparams['errormail'], $_POST['description'], $msg);
} else {
if (isset($_SERVER['SERVER_ADMIN']))
mail($_SERVER['SERVER_ADMIN'], 'Empty jupload error... | [
"private",
"function",
"receive_debug_log",
"(",
")",
"{",
"// handle error report",
"if",
"(",
"isset",
"(",
"$",
"_POST",
"[",
"'description'",
"]",
")",
"&&",
"isset",
"(",
"$",
"_POST",
"[",
"'log'",
"]",
")",
")",
"{",
"$",
"msg",
"=",
"$",
"_POST... | This method manages the receiving of the debug log, when an error occurs. | [
"This",
"method",
"manages",
"the",
"receiving",
"of",
"the",
"debug",
"log",
"when",
"an",
"error",
"occurs",
"."
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/public/js/filemanager/uploader/jupload.php#L507-L519 |
27,390 | melisplatform/melis-core | src/Controller/PluginViewController.php | PluginViewController.generateAction | public function generateAction()
{
/**
* Determine if it comes from an ajax call
* so we can send back different datas with the html
*/
$isXmlHttpRequest = false;
if ($this->getRequest()->isXmlHttpRequest()) {
$isXmlHttpRequest = true;
}
... | php | public function generateAction()
{
/**
* Determine if it comes from an ajax call
* so we can send back different datas with the html
*/
$isXmlHttpRequest = false;
if ($this->getRequest()->isXmlHttpRequest()) {
$isXmlHttpRequest = true;
}
... | [
"public",
"function",
"generateAction",
"(",
")",
"{",
"/**\n * Determine if it comes from an ajax call\n * so we can send back different datas with the html\n */",
"$",
"isXmlHttpRequest",
"=",
"false",
";",
"if",
"(",
"$",
"this",
"->",
"getRequest",
"("... | Generate a view of the appConfig and returns it
@routeParam appconfigpath Path in the appConfig file (ex: /meliscore/interface/meliscore_header)
@routeParam keyview Name of the child view for further rendering
@return \Zend\View\Model\ViewModel | [
"Generate",
"a",
"view",
"of",
"the",
"appConfig",
"and",
"returns",
"it"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/PluginViewController.php#L65-L167 |
27,391 | melisplatform/melis-core | src/Controller/PluginViewController.php | PluginViewController.orderInterfaceChildren | public function orderInterfaceChildren($parentKey, $childrenInterface)
{
$melisAppConfig = $this->getServiceLocator()->get('MelisCoreConfig');
$orderInterface = $melisAppConfig->getOrderInterfaceConfig($parentKey);
if (empty($orderInterface)) {
// No order defined, items are dis... | php | public function orderInterfaceChildren($parentKey, $childrenInterface)
{
$melisAppConfig = $this->getServiceLocator()->get('MelisCoreConfig');
$orderInterface = $melisAppConfig->getOrderInterfaceConfig($parentKey);
if (empty($orderInterface)) {
// No order defined, items are dis... | [
"public",
"function",
"orderInterfaceChildren",
"(",
"$",
"parentKey",
",",
"$",
"childrenInterface",
")",
"{",
"$",
"melisAppConfig",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'MelisCoreConfig'",
")",
";",
"$",
"orderInterface",
... | This function takes the list of children and reorders them by comparing
the order list available in MelisModuleConfig.
@param string $parentKey
@param array $childrenInterface
@return array | [
"This",
"function",
"takes",
"the",
"list",
"of",
"children",
"and",
"reorders",
"them",
"by",
"comparing",
"the",
"order",
"list",
"available",
"in",
"MelisModuleConfig",
"."
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/PluginViewController.php#L178-L210 |
27,392 | melisplatform/melis-core | src/Service/MelisCoreGdprService.php | MelisCoreGdprService.extractSelected | public function extractSelected($idsToBeExtractedArray = [])
{
//created selected index
$arrayParameters['selected'] = $idsToBeExtractedArray;
// Sending service start event
$arrayParameters = $this->sendEvent('melis_core_gdpr_user_extract_event', $arrayParameters);
$xml = ... | php | public function extractSelected($idsToBeExtractedArray = [])
{
//created selected index
$arrayParameters['selected'] = $idsToBeExtractedArray;
// Sending service start event
$arrayParameters = $this->sendEvent('melis_core_gdpr_user_extract_event', $arrayParameters);
$xml = ... | [
"public",
"function",
"extractSelected",
"(",
"$",
"idsToBeExtractedArray",
"=",
"[",
"]",
")",
"{",
"//created selected index",
"$",
"arrayParameters",
"[",
"'selected'",
"]",
"=",
"$",
"idsToBeExtractedArray",
";",
"// Sending service start event",
"$",
"arrayParamete... | This function will Retrieve xml string of user's info based on the ids passed
and Returns a xml string containing all modules that matched the ids passed
This event will take in the IDs of the selected items on the table as the parameters so please follow this structure.
Parameter for the event value structure:
array... | [
"This",
"function",
"will",
"Retrieve",
"xml",
"string",
"of",
"user",
"s",
"info",
"based",
"on",
"the",
"ids",
"passed",
"and",
"Returns",
"a",
"xml",
"string",
"containing",
"all",
"modules",
"that",
"matched",
"the",
"ids",
"passed"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisCoreGdprService.php#L127-L167 |
27,393 | melisplatform/melis-core | src/Service/MelisCoreGdprService.php | MelisCoreGdprService.deleteSelected | public function deleteSelected($idsToBeDeletedArray = [])
{
// Create selected index for the array
$arrayParameters['selected'] = $idsToBeDeletedArray;
// Sending service start event
$arrayParameters = $this->sendEvent('melis_core_gdpr_user_delete_event', $arrayParameters);
... | php | public function deleteSelected($idsToBeDeletedArray = [])
{
// Create selected index for the array
$arrayParameters['selected'] = $idsToBeDeletedArray;
// Sending service start event
$arrayParameters = $this->sendEvent('melis_core_gdpr_user_delete_event', $arrayParameters);
... | [
"public",
"function",
"deleteSelected",
"(",
"$",
"idsToBeDeletedArray",
"=",
"[",
"]",
")",
"{",
"// Create selected index for the array",
"$",
"arrayParameters",
"[",
"'selected'",
"]",
"=",
"$",
"idsToBeDeletedArray",
";",
"// Sending service start event",
"$",
"arra... | This function will delete all ids passed and
This event will take in the IDs of the selected items on the table as the parameters so please follow this structure.
Parameter for the event value structure:
array(
'selected' => array(
'MelisCmsProspects' => array(13,15),
'MelisCmsNewsletter' => 'array(2),
),
)
*
The mo... | [
"This",
"function",
"will",
"delete",
"all",
"ids",
"passed",
"and"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Service/MelisCoreGdprService.php#L195-L207 |
27,394 | melisplatform/melis-core | src/Controller/MelisAuthController.php | MelisAuthController.loginAction | public function loginAction()
{
$isChecked = false;
$pathAppConfigForm = '/meliscore/forms/meliscore_login';
$melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$appConfigForm = $melisMelisCoreConfig->getItem($pathAppConfigForm);
$factory = new \Zend\Form... | php | public function loginAction()
{
$isChecked = false;
$pathAppConfigForm = '/meliscore/forms/meliscore_login';
$melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$appConfigForm = $melisMelisCoreConfig->getItem($pathAppConfigForm);
$factory = new \Zend\Form... | [
"public",
"function",
"loginAction",
"(",
")",
"{",
"$",
"isChecked",
"=",
"false",
";",
"$",
"pathAppConfigForm",
"=",
"'/meliscore/forms/meliscore_login'",
";",
"$",
"melisMelisCoreConfig",
"=",
"$",
"this",
"->",
"serviceLocator",
"->",
"get",
"(",
"'MelisCoreC... | Shows login form
@return \Zend\View\Model\ViewModel | [
"Shows",
"login",
"form"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/MelisAuthController.php#L69-L99 |
27,395 | melisplatform/melis-core | src/Controller/MelisAuthController.php | MelisAuthController.crypt | protected function crypt($data, $type = 'encrypt')
{
$melisConfig = $this->getServiceLocator()->get('MelisCoreConfig');
$datas = $melisConfig->getItemPerPlatform('meliscore/datas');
$hashMethod = $datas['accounts']['hash_method'];
$salt = $datas['accounts']['salt'];
if ($ty... | php | protected function crypt($data, $type = 'encrypt')
{
$melisConfig = $this->getServiceLocator()->get('MelisCoreConfig');
$datas = $melisConfig->getItemPerPlatform('meliscore/datas');
$hashMethod = $datas['accounts']['hash_method'];
$salt = $datas['accounts']['salt'];
if ($ty... | [
"protected",
"function",
"crypt",
"(",
"$",
"data",
",",
"$",
"type",
"=",
"'encrypt'",
")",
"{",
"$",
"melisConfig",
"=",
"$",
"this",
"->",
"getServiceLocator",
"(",
")",
"->",
"get",
"(",
"'MelisCoreConfig'",
")",
";",
"$",
"datas",
"=",
"$",
"melis... | Encryption of passwords for melis
@param array $data
@param string $type
@return string | [
"Encryption",
"of",
"passwords",
"for",
"melis"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/MelisAuthController.php#L109-L126 |
27,396 | melisplatform/melis-core | src/Controller/MelisAuthController.php | MelisAuthController.rememberMe | protected function rememberMe($username, $password)
{
$melisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$authCookieConfig = $melisCoreConfig->getItem('meliscore/datas/default/auth_cookies');
$remember = $authCookieConfig['remember'];
$user = new SetCookie('cookie1', ... | php | protected function rememberMe($username, $password)
{
$melisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$authCookieConfig = $melisCoreConfig->getItem('meliscore/datas/default/auth_cookies');
$remember = $authCookieConfig['remember'];
$user = new SetCookie('cookie1', ... | [
"protected",
"function",
"rememberMe",
"(",
"$",
"username",
",",
"$",
"password",
")",
"{",
"$",
"melisCoreConfig",
"=",
"$",
"this",
"->",
"serviceLocator",
"->",
"get",
"(",
"'MelisCoreConfig'",
")",
";",
"$",
"authCookieConfig",
"=",
"$",
"melisCoreConfig"... | Remember me function creation cookie
@param string $username
@param string $password | [
"Remember",
"me",
"function",
"creation",
"cookie"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/MelisAuthController.php#L358-L381 |
27,397 | melisplatform/melis-core | src/Controller/MelisAuthController.php | MelisAuthController.forgetMe | protected function forgetMe($username, $password)
{
$melisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$authCookieConfig = $melisCoreConfig->getItem('meliscore/datas/default/auth_cookies');
$expire = $authCookieConfig['expire'];
$user = new SetCookie('cookie1', $this... | php | protected function forgetMe($username, $password)
{
$melisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
$authCookieConfig = $melisCoreConfig->getItem('meliscore/datas/default/auth_cookies');
$expire = $authCookieConfig['expire'];
$user = new SetCookie('cookie1', $this... | [
"protected",
"function",
"forgetMe",
"(",
"$",
"username",
",",
"$",
"password",
")",
"{",
"$",
"melisCoreConfig",
"=",
"$",
"this",
"->",
"serviceLocator",
"->",
"get",
"(",
"'MelisCoreConfig'",
")",
";",
"$",
"authCookieConfig",
"=",
"$",
"melisCoreConfig",
... | Forget me function
@param string $username
@param string $password | [
"Forget",
"me",
"function"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/MelisAuthController.php#L389-L406 |
27,398 | melisplatform/melis-core | src/Controller/MelisAuthController.php | MelisAuthController.headerLogoutAction | public function headerLogoutAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$view = new ViewModel();
$view->melisKey = $melisKey;
return $view;
} | php | public function headerLogoutAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$view = new ViewModel();
$view->melisKey = $melisKey;
return $view;
} | [
"public",
"function",
"headerLogoutAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"$",
"view",
"=",
"new",
"ViewModel",
"(",
")",
";",
"$",
"view",
"->",... | Shows logout button in header
@return \Zend\View\Model\ViewModel | [
"Shows",
"logout",
"button",
"in",
"header"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/MelisAuthController.php#L413-L421 |
27,399 | melisplatform/melis-core | src/Controller/MelisAuthController.php | MelisAuthController.identityMenuAction | public function identityMenuAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$melisCoreAuth = $this->serviceLocator->get('MelisCoreAuth');
$userAuthDatas = $melisCoreAuth->getStorage()->read();
$view = new ViewModel();
$view->melisKey = $melisKey;
... | php | public function identityMenuAction()
{
$melisKey = $this->params()->fromRoute('melisKey', '');
$melisCoreAuth = $this->serviceLocator->get('MelisCoreAuth');
$userAuthDatas = $melisCoreAuth->getStorage()->read();
$view = new ViewModel();
$view->melisKey = $melisKey;
... | [
"public",
"function",
"identityMenuAction",
"(",
")",
"{",
"$",
"melisKey",
"=",
"$",
"this",
"->",
"params",
"(",
")",
"->",
"fromRoute",
"(",
"'melisKey'",
",",
"''",
")",
";",
"$",
"melisCoreAuth",
"=",
"$",
"this",
"->",
"serviceLocator",
"->",
"get"... | Shows identity zone in the left menu
@return \Zend\View\Model\ViewModel | [
"Shows",
"identity",
"zone",
"in",
"the",
"left",
"menu"
] | f8b0648930e21d1f2b2e5b9300781c335bd34ea4 | https://github.com/melisplatform/melis-core/blob/f8b0648930e21d1f2b2e5b9300781c335bd34ea4/src/Controller/MelisAuthController.php#L428-L441 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.