"entity_info" service call
I'm trying to modify the profile info block on the person's page. the service call used in the block is 'entity_info'. Where can I find the $iContentId PARAMS used for the 'persons' module so that I can add / remove the fileds appearing in the info block? also, what is the table that contains list of these variables used for $iContentId?
-
-
·
LeonidS
- ·
Hello SehaSky !
If $iContentId variable isn't passed as the argument then it is calculated with the method _getContent. For the profile-based modules like Persons it has the following syntax:
protected function _getContent($iContentId = 0, $sFuncGetContent = 'getContentInfoById')
{
if(!$iContentId && bx_get('id') === false && bx_get('profile_id') !== false) {
$oProfile = BxDolProfile::getInstance((int)bx_get('profile_id'));
if($oProfile)
$iContentId = $oProfile->getContentId();
}
return parent::_getContent($iContentId, $sFuncGetContent);
}
So by default, firstly it will look the GET id or profile_id variables.
-
·
LeonidS
-
- · Scholar
- ·
that was really helpful, however, when I tracked the code of serviceEntityInfo() function, there was no mention of _getContent().
For the future, any advice on how to track the code when the service function contains only variables like $iContent with no mention of the main _getContent() function? is there any way to track service calls up to the tables (such as TABLE_ENTRIES in the entity_info)? -
-
·
LeonidS
- ·
You need to check from the BxBaseModGeneralModule class (modules\base\general\classes\BxBaseModGeneralModule.php) where this method serviceEntityInfo has been declared. Then go to _serviceEntityForm method which includes the call of _getContent method.
-
·
LeonidS