Method getListViewMassActions
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getListViewMassActions($linkParams)
{
$links['LISTVIEWMASSACTION'] = [];
$massActionLinks = [];
if ('Users' === $linkParams['MODULE'] && 'List' === $linkParams['ACTION'] && App\User::getCurrentUserModel()->isAdmin()) {
Function getListViewHeaders
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getListViewHeaders()
{
$headerFieldModels = [];
$headerFields = $this->getQueryGenerator()->getListViewFields();
foreach ($headerFields as $fieldName => &$fieldsModel) {
- 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
Avoid using undefined variables such as '$links' which will lead to PHP notices. Open
return $links;
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$links' which will lead to PHP notices. Open
$links['LISTVIEWMASSACTION'][] = Vtiger_Link_Model::getInstanceFromValues($massActionLink);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$links' which will lead to PHP notices. Open
$links['LISTVIEWMASSACTION'] = [];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using static access to class '\App\Privilege' in method 'getAdvancedLinks'. Open
$createPermission = \App\Privilege::isPermitted($moduleModel->getName(), 'CreateView');
- 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 'getListViewLinks'. Open
$links['LISTVIEW'][] = Vtiger_Link_Model::getInstanceFromValues($advancedLink);
- 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 'getListViewLinks'. Open
$links = Vtiger_Link_Model::getAllByType($this->getModule()->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\Config' in method 'getListViewMassActions'. Open
if ('TOTP_OFF' !== App\Config::security('USER_AUTHY_MODE')) {
- 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['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_Link_Model' in method 'getListViewLinks'. Open
$links['LISTVIEWBASIC'][] = Vtiger_Link_Model::getInstanceFromValues([
'linktype' => 'LISTVIEWBASIC',
'linklabel' => 'LBL_ADD_RECORD',
'linkurl' => $this->getModule()->getCreateRecordUrl(),
'linkicon' => '',
- 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\Privilege' in method 'getAdvancedLinks'. Open
$importPermission = \App\Privilege::isPermitted($moduleModel->getName(), 'Import');
- 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" 6 times. Open
'linklabel' => 'LBL_ADD_RECORD',
- 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" 6 times. Open
'linkurl' => $this->getModule()->getCreateRecordUrl(),
- 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" 5 times. Open
$links['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" 6 times. Open
'linktype' => 'LISTVIEWBASIC',
- 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 "LISTVIEW" 4 times. Open
$linkTypes = ['LISTVIEWBASIC', 'LISTVIEW', 'LISTVIEWSETTING'];
- 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" 6 times. Open
'linkicon' => '',
- 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 "LISTVIEWBASIC" 3 times. Open
$linkTypes = ['LISTVIEWBASIC', 'LISTVIEW', 'LISTVIEWSETTING'];
- 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.
Saw unextractable annotation for comment '* @param <array> $linkParams'</array>
Open
* @param <Array> $linkParams
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
if ('Users' === $linkParams['MODULE'] && 'List' === $linkParams['ACTION'] && App\User::getCurrentUserModel()->isAdmin()) {
- Exclude checks
Call to method getFields
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$fields = $queryGenerator->getFields();
- Exclude checks
Call to method setRelatedOrder
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
return $this->getQueryGenerator()->setRelatedOrder([
- Exclude checks
Call to method getCurrentUserModel
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
if (App\User::getCurrentUserModel()->isAdmin()) {
- Exclude checks
Saw unextractable annotation for comment '* @param <array> $linkParams'</array>
Open
* @param <Array> $linkParams
- Exclude checks
Call to method setOrder
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
return $this->getQueryGenerator()->setOrder($orderBy, $this->getForSql('sortorder'));
- Exclude checks
Call to method getListViewFields
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$headerFields = $this->getQueryGenerator()->getListViewFields();
- Exclude checks
Saw unextractable annotation for comment '* @return <array> - Associate array of Link Type to List of Vtiger_Link_Model instances'</array>
Open
* @return <Array> - Associate array of Link Type to List of Vtiger_Link_Model instances
- 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
Variable $links
was undeclared, but array fields are being added to it. Open
$links['LISTVIEWMASSACTION'] = [];
- Exclude checks
Call to method setFields
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$queryGenerator->setFields($fields);
- Exclude checks
Argument 1 (moduleName)
is false
but \App\Privilege::isPermitted()
takes string
defined at /code/app/Privilege.php:48
Open
$importPermission = \App\Privilege::isPermitted($moduleModel->getName(), 'Import');
- Exclude checks
Argument 1 (moduleName)
is false
but \App\Privilege::isPermitted()
takes string
defined at /code/app/Privilege.php:48
Open
$createPermission = \App\Privilege::isPermitted($moduleModel->getName(), 'CreateView');
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Users_ListView_Model extends Vtiger_ListView_Model
- Exclude checks
The class Users_ListView_Model is not named in CamelCase. Open
class Users_ListView_Model extends Vtiger_ListView_Model
{
/**
* Function to get the list of listview links for the module.
*
- 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
* @return <Array> - Associate array of Link Type to List of Vtiger_Link_Model instances
- 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
'linkicon' => 'yfi yfi-full-editing-view',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fields[] = 'authy_secret_totp';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getListViewLinks($linkParams)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => $this->getModule()->getCreateRecordUrl(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
'linkurl' => 'javascript:Vtiger_List_Js.triggerMassEdit("index.php?module=Users&view=MassActionAjax&mode=showMassEditForm");',
- 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-key',
- 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 (App\User::getCurrentUserModel()->isAdmin()) {
- 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
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$advancedLinks = $this->getAdvancedLinks();
- 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
* @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
];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fields[] = 'imagename';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$queryGenerator->setFields($fields);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get the list view header.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
continue;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$headerFieldModels[$fieldName] = $fieldsModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$createPermission = \App\Privilege::isPermitted($moduleModel->getName(), 'CreateView');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$links = Vtiger_Link_Model::getAllByType($this->getModule()->getId(), $linkTypes, $linkParams);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkclass' => 'btn-light',
- 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
$links['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
{
- 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
return $headerFieldModels;
- 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
* @param <Array> $linkParams
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_ADD_RECORD',
- 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 ('Users' === $linkParams['MODULE'] && 'List' === $linkParams['ACTION'] && App\User::getCurrentUserModel()->isAdmin()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get the list of listview links for the module.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$links['LISTVIEWBASIC'][] = Vtiger_Link_Model::getInstanceFromValues([
- 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
'linkicon' => 'fas fa-redo-alt',
- 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
$links['LISTVIEWMASSACTION'][] = Vtiger_Link_Model::getInstanceFromValues($massActionLink);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Added as Users module do not have custom filters and id column is added by querygenerator.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fields = $queryGenerator->getFields();
- 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
*
- 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
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return Vtiger_Field_Model[] - List of Vtiger_Field_Model instances
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($fieldsModel && ((!$fieldsModel->isViewable() && 106 !== $fieldsModel->getUitype()) || !$fieldsModel->getPermissions())) {
- 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
'linktype' => 'LISTVIEWMASSACTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$headerFieldModels = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($headerFields as $fieldName => &$fieldsModel) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return array of advanced links
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$linkTypes = ['LISTVIEWBASIC', 'LISTVIEW', 'LISTVIEWSETTING'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('TOTP_OFF' !== App\Config::security('USER_AUTHY_MODE')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => 'javascript:Settings_Users_List_Js.triggerMassOff2FA()',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to give advance links of Users module.
- 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
$queryGenerator = $this->getQueryGenerator();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getListViewHeaders()
- 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
$importPermission = \App\Privilege::isPermitted($moduleModel->getName(), 'Import');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$links['LISTVIEW'][] = Vtiger_Link_Model::getInstanceFromValues($advancedLink);
- 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:Vtiger_List_Js.triggerMassEdit("index.php?module=Users&view=MassActionAjax&mode=showMassEditForm");',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => 'index.php?module=Users&view=PasswordModal&mode=massReset',
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'BTN_MASS_OFF_2FA',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getListViewEntries(Vtiger_Paging_Model $pagingModel)
- 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
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$headerFields = $this->getQueryGenerator()->getListViewFields();
- 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' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $links;
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
if ('Users' === $linkParams['MODULE'] && 'List' === $linkParams['ACTION'] && App\User::getCurrentUserModel()->isAdmin()) {
- 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 ($importPermission && $createPermission) {
- 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
'linktype' => 'LISTVIEWBASIC',
- Exclude checks
Line exceeds 120 characters; contains 138 characters Open
if ($fieldsModel && ((!$fieldsModel->isViewable() && 106 !== $fieldsModel->getUitype()) || !$fieldsModel->getPermissions())) {
- 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
'linklabel' => 'LBL_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
{
- 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
foreach ($advancedLinks as $advancedLink) {
- 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
$fields[] = 'id';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return parent::getListViewEntries($pagingModel);
- 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
$advancedLinks = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'relatedModule' => $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
'linklabel' => 'LBL_MASS_EDIT',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'BTN_MASS_RESET_PASSWORD',
- 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
$advancedLinks[] = [
- 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
'linkurl' => 'javascript:Vtiger_List_Js.triggerExportAction("' . $moduleModel->getExportUrl() . '")',
- 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
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$orderBy = $this->getForSql('orderby');
- 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
return $advancedLinks;
- 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
'relatedSortOrder' => $this->getForSql('sortorder'),
- 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-download',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getQueryGenerator()->setOrder($orderBy, $this->getForSql('sortorder'));
- 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 ($sourceFieldName) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'sourceField' => $sourceFieldName,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linklabel' => 'LBL_IMPORT',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
[$fieldName, $moduleName, $sourceFieldName] = array_pad(explode(':', $orderBy), 3, false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $this->getQueryGenerator()->setRelatedOrder([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'relatedField' => $fieldName,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($orderBy)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkurl' => $moduleModel->getImportUrl(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function loadListViewOrderBy()
- Exclude checks
Class name "Users_ListView_Model" is not in camel caps format Open
class Users_ListView_Model extends Vtiger_ListView_Model
- Exclude checks