Method getListViewMassActions
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getListViewMassActions($linkParams)
{
$moduleModel = $this->getModule();
$moduleName = $moduleModel->getName();
Method getAdvancedLinks
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAdvancedLinks()
{
$moduleModel = $this->getModule();
$moduleName = $moduleModel->getName();
$advancedLinks = [];
Function getListViewMassActions
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getListViewMassActions($linkParams)
{
$moduleModel = $this->getModule();
$moduleName = $moduleModel->getName();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getAdvancedLinks
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getAdvancedLinks()
{
$moduleModel = $this->getModule();
$moduleName = $moduleModel->getName();
$advancedLinks = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The method getListViewMassActions() has an NPath complexity of 512. The configured NPath complexity threshold is 200. Open
public function getListViewMassActions($linkParams)
{
$moduleModel = $this->getModule();
$moduleName = $moduleModel->getName();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method getListViewMassActions() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10. Open
public function getListViewMassActions($linkParams)
{
$moduleModel = $this->getModule();
$moduleName = $moduleModel->getName();
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Avoid using static access to class 'Vtiger_Link_Model' in method 'getListViewMassActions'. Open
$links['LISTVIEWMASSACTION'][] = Vtiger_Link_Model::getInstanceFromValues($massActionLink);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Vtiger_Loader' in method 'getAdvancedLinks'. Open
$handlerClass = Vtiger_Loader::getComponentClassName('Model', 'PDF', $moduleName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Language' in method 'getAdvancedLinks'. Open
'linklabel' => \App\Language::translate('LBL_EXPORT_PDF'),
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Vtiger_Link_Model' in method 'getListViewMassActions'. Open
$links = Vtiger_Link_Model::getAllByType($moduleModel->getId(), $linkTypes, $linkParams);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Language' in method 'getAdvancedLinks'. Open
'title' => \App\Language::translate('LBL_EXPORT_PDF'),
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Vtiger_Loader' in method 'getAdvancedLinks'. Open
$handlerClass = Vtiger_Loader::getComponentClassName('Model', 'MappedFields', $moduleName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Define a constant instead of duplicating this literal "linklabel" 12 times. Open
'linklabel' => 'LBL_EXPORT',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "js-mass-record-event" 4 times. Open
'linkclass' => 'js-mass-record-event',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "linkclass" 6 times. Open
'linkclass' => 'js-mass-action',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "linkurl" 10 times. Open
'linkurl' => "javascript:Vtiger_List_Js.triggerExportAction('$exportUrl')",
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "linkicon" 11 times. Open
'linkicon' => 'fas fa-upload',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "LISTVIEWMASSACTION" 11 times. Open
'linktype' => 'LISTVIEWMASSACTION',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "linktype" 12 times. Open
'linktype' => 'LISTVIEW',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "javascript:" 4 times. Open
'linkurl' => 'javascript:',
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "dataUrl" 4 times. Open
'dataUrl' => "index.php?module=$moduleName&action=MassState&state=Active&sourceView=List",
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Argument 3 (moduleName)
is false
but \Vtiger_Loader::getComponentClassName()
takes string
defined at /code/include/Loader.php:149
Open
$handlerClass = Vtiger_Loader::getComponentClassName('Model', 'MappedFields', $moduleName);
- Exclude checks
Argument 3 (moduleName)
is false
but \Vtiger_Loader::getComponentClassName()
takes string
defined at /code/include/Loader.php:149
Open
$handlerClass = Vtiger_Loader::getComponentClassName('Model', 'PDF', $moduleName);
- Exclude checks
Suspicious type false
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
'linkurl' => "javascript:Vtiger_List_Js.triggerQuickExport('$moduleName')",
- Exclude checks
Saw unextractable annotation for comment '* @param <array> $linkParams'</array>
Open
* @param <Array> $linkParams
- Exclude checks
Suspicious type false
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
'linkdata' => ['url' => 'index.php?module=' . $moduleName . '&view=PDF&fromview=List', 'type' => 'modal'],
- Exclude checks
Suspicious type false
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
'linkurl' => "javascript:Vtiger_List_Js.triggerTransferOwnership('index.php?module={$moduleName}&view=TransferOwnership')",
- Exclude checks
Call to method addCondition
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$queryGenerator->addCondition($this->get('folder_id'), $folderValue, 'e');
- Exclude checks
Saw unextractable annotation for comment '* @return <array> - Associative array of Link type to List of Vtiger_Link_Model instances for Mass Actions'</array>
Open
* @return <Array> - Associative array of Link type to List of Vtiger_Link_Model instances for Mass Actions
- Exclude checks
Suspicious type false
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
'linkurl' => "javascript:Vtiger_List_Js.triggerMassEdit('index.php?module=$moduleName&view=MassActionAjax&mode=showMassEditForm&sourceView=List');",
- Exclude checks
Suspicious type false
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
'url' => 'index.php?module=' . $moduleName . '&view=MassAddDocuments&sourceView=List',
- Exclude checks
Call to method setField
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$queryGenerator->setField('filetype');
- Exclude checks
Suspicious type false
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
'dataUrl' => "index.php?module=$moduleName'&action=MassState&state=Archived&sourceView=List",
- Exclude checks
Suspicious type false
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
'dataUrl' => "index.php?module=$moduleName&action=MassDelete&sourceView=List",
- Exclude checks
Suspicious type false
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
'dataUrl' => "index.php?module=$moduleName&action=MassState&state=Active&sourceView=List",
- Exclude checks
Suspicious type false
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
'linkurl' => "javascript:Documents_List_Js.massMove('index.php?module=$moduleName&view=MoveDocuments&sourceView=List');",
- Exclude checks
Suspicious type false
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
'dataUrl' => "index.php?module=$moduleName&action=MassState&state=Trash&sourceView=List",
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Documents_ListView_Model extends Vtiger_ListView_Model
- Exclude checks
The class Documents_ListView_Model is not named in CamelCase. Open
class Documents_ListView_Model extends Vtiger_ListView_Model
{
public function getAdvancedLinks()
{
$moduleModel = $this->getModule();
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$templates = $pdfModel->getActiveTemplatesForModule($moduleName, 'List');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleName = $moduleModel->getName();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'fas fa-upload',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_EXPORT',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getAdvancedLinks()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$pdfModel = new $handlerClass();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleModel = $this->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$advancedLinks = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => "javascript:Vtiger_List_Js.triggerExportAction('$exportUrl')",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$advancedLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$handlerClass = Vtiger_Loader::getComponentClassName('Model', 'PDF', $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEW',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('ExportPdf')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('Export')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$exportUrl = $this->getModule()->getExportUrl();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mfModel = new $handlerClass();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'yfi-document-templates',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => 'javascript:',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'dataUrl' => "index.php?module=$moduleName&action=MassState&state=Trash&sourceView=List",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($folderValue)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Line exceeds 120 characters; contains 126 characters Open
'linkdata' => ['url' => 'index.php?module=' . $moduleName . '&view=PDF&fromview=List', 'type' => 'modal'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param <Array> $linkParams
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$links = Vtiger_Link_Model::getAllByType($moduleModel->getId(), $linkTypes, $linkParams);
- Exclude checks
Line exceeds 120 characters; contains 164 characters Open
'linkurl' => "javascript:Vtiger_List_Js.triggerMassEdit('index.php?module=$moduleName&view=MassActionAjax&mode=showMassEditForm&sourceView=List');",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkclass' => 'js-show-modal',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('MassActive')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_MASS_ACTIVATE',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($massActionLinks as $massActionLink) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->addCondition($this->get('folder_id'), $folderValue, 'e');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'title' => \App\Language::translate('LBL_EXPORT_PDF'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return <Array> - Associative array of Link type to List of Vtiger_Link_Model instances for Mass Actions
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//Opensource fix to make documents module mass editable
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_TRANSFER_OWNERSHIP',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkclass' => 'js-mass-record-event',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_MASS_ARCHIVE',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function loadListViewCondition()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkclass' => 'js-mass-record-event',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator = $this->getQueryGenerator();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->setField('filetype');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'fas fa-file-pdf',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => "javascript:Vtiger_List_Js.triggerMassEdit('index.php?module=$moduleName&view=MassActionAjax&mode=showMassEditForm&sourceView=List');",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('MassArchived')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleName = $moduleModel->getName();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$massActionLinks = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('MassMoveDocuments')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_MASS_ADD',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'cb' => 'Documents_MassAddDocuments_Js.register',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'fas fa-file-export',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$handlerClass = Vtiger_Loader::getComponentClassName('Model', 'MappedFields', $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (\count($templates) > 0) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'fas fa-edit',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'fas fa-trash-alt',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkdata' => ['url' => 'index.php?module=' . $moduleName . '&view=PDF&fromview=List', 'type' => 'modal'],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEW',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get the list of Mass actions for the module.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$massActionLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_MOVE',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('MassTransferOwnership')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'dataUrl' => "index.php?module=$moduleName&action=MassState&state=Active&sourceView=List",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('MassTrash')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$massActionLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkclass' => 'js-mass-action',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => "javascript:Vtiger_List_Js.triggerTransferOwnership('index.php?module={$moduleName}&view=TransferOwnership')",
- Exclude checks
Line exceeds 120 characters; contains 139 characters Open
'linkurl' => "javascript:Vtiger_List_Js.triggerTransferOwnership('index.php?module={$moduleName}&view=TransferOwnership')",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$massActionLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkclass' => 'js-mass-record-event',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('QuickExportToExcel')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_GENERATE_RECORDS',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$linkTypes = ['LISTVIEWMASSACTION'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$massActionLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$massActionLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_MASS_DELETE',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'fas fa-eraser',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'DETAIL_VIEW_ADDITIONAL',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$advancedLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => "javascript:Documents_List_Js.massMove('index.php?module=$moduleName&view=MoveDocuments&sourceView=List');",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'fas fa-folder-open',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('CreateView')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
],
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$massActionLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'fas fa-undo-alt',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'dataUrl' => "index.php?module=$moduleName'&action=MassState&state=Archived&sourceView=List",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'dataUrl' => "index.php?module=$moduleName&action=MassDelete&sourceView=List",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (\count($templates) > 0) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$advancedLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$templates = $mfModel->getActiveTemplatesForModule($moduleName, 'List');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => 'javascript:Vtiger_List_Js.triggerGenerateRecords();',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'view' => 'List',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_MASS_MOVE_TO_TRASH',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $links;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_EDIT',
- Exclude checks
Line exceeds 120 characters; contains 137 characters Open
'linkurl' => "javascript:Documents_List_Js.massMove('index.php?module=$moduleName&view=MoveDocuments&sourceView=List');",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'url' => 'index.php?module=' . $moduleName . '&view=MassAddDocuments&sourceView=List',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => 'javascript:',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$links['LISTVIEWMASSACTION'][] = Vtiger_Link_Model::getInstanceFromValues($massActionLink);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_QUICK_EXPORT',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('RecordMappingList')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $advancedLinks;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'yfi yfi-change-of-owner',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$folderValue = $this->get('folder_value');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => \App\Language::translate('LBL_EXPORT_PDF'),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleModel = $this->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$massActionLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkdata' => [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => 'javascript:',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkicon' => 'fas fa-archive',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parent::loadListViewCondition();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$advancedLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => "javascript:Vtiger_List_Js.triggerQuickExport('$moduleName')",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getListViewMassActions($linkParams)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('MassEdit')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkclass' => 'js-mass-record-event',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$massActionLinks[] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => 'javascript:',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($moduleModel->isPermitted('MassDelete')) {
- Exclude checks
Class name "Documents_ListView_Model" is not in camel caps format Open
class Documents_ListView_Model extends Vtiger_ListView_Model
- Exclude checks