Hi all,
I'm looking to overwrite a specific value set in the static getStructure($structure) function in the User Entity class.
I'd like to override one of the specific columns in the getStructure method and have a question on syntax:
Will the above be the correct way of extending this, or should I be using the $structure->set function at this stage? I'm looking specifically to override the custom_title maxLength from 50 to be 100.
Edit: possibly being dumb - updated the above code to fix an array typo.
Thanks,
Will
I'm looking to overwrite a specific value set in the static getStructure($structure) function in the User Entity class.
I'd like to override one of the specific columns in the getStructure method and have a question on syntax:
PHP:
class User extends XFCP_User
{
public static function getStructure(Structure $structure)
{
$results = parent::getStructure($structure);
$results->columns['custom_title'] = ['type' => self::STR, 'maxLength' => 100, 'default' => '',
'censor' => true
];
return $results;
}
}
Will the above be the correct way of extending this, or should I be using the $structure->set function at this stage? I'm looking specifically to override the custom_title maxLength from 50 to be 100.
Edit: possibly being dumb - updated the above code to fix an array typo.
Thanks,
Will
Last edited: