Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Used class argument AllowDynamicProperties #17219

Open
wants to merge 3 commits into
base: developer
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/CRMEntity.php
Expand Up @@ -31,8 +31,11 @@
require_once 'modules/Users/Users.php';
require_once 'include/Webservices/Utils.php';

#[AllowDynamicProperties]
class CRMEntity
{
/** @var int Record id */
public $id;
/** @var string Table name */
public $table_name = '';
/** @var string Table index */
Expand Down
1 change: 1 addition & 0 deletions modules/Users/models/Privileges.php
Expand Up @@ -12,6 +12,7 @@
/**
* User Privileges Model Class.
*/
#[AllowDynamicProperties]
class Users_Privileges_Model extends Users_Record_Model
{
/**
Expand Down
1 change: 1 addition & 0 deletions modules/Users/models/Record.php
Expand Up @@ -10,6 +10,7 @@
* Contributor(s): YetiForce S.A.
* *********************************************************************************** */

#[AllowDynamicProperties]
class Users_Record_Model extends Vtiger_Record_Model
{
/** {@inheritdoc} */
Expand Down
9 changes: 8 additions & 1 deletion modules/Vtiger/models/Field.php
Expand Up @@ -12,6 +12,7 @@
/**
* Vtiger Field Model Class.
*/
#[AllowDynamicProperties]
class Vtiger_Field_Model extends vtlib\Field
{
const REFERENCE_TYPE = 'reference';
Expand Down Expand Up @@ -52,6 +53,12 @@ class Vtiger_Field_Model extends vtlib\Field
/** @var array Module field info. */
protected $fieldInfo;

/** @var bool Read only mode. */
public $isReadOnly = false;

/** @var Vtiger_Module_Model Module model. */
public $module;

/** @var string Field type. */
protected $fieldType;

Expand Down Expand Up @@ -868,7 +875,7 @@ public function isEditableReadOnly()
*/
public function isReadOnly(): bool
{
if (isset($this->isReadOnly)) {
if (!empty($this->isReadOnly)) {
return $this->isReadOnly;
}
return $this->isReadOnly = !$this->getProfileReadWritePermission();
Expand Down
2 changes: 2 additions & 0 deletions vtlib/Vtiger/Link.php
Expand Up @@ -10,12 +10,14 @@
* ********************************************************************************** */

namespace vtlib;
use AllowDynamicProperties;

include_once 'vtlib/Vtiger/Utils/StringTemplate.php';

/**
* Provides API to handle custom links.
*/
#[AllowDynamicProperties]
class Link
{
// Ignore module while selection
Expand Down