Comment to 'Profile Timeline Logic'
  • Hello SehaSky !

    Let me try to add the current comments :-) My answers have the bold font.

    if(empty($sProfileModule))

           return array();

    If the given module's name is empty, return the empty array for the block (empty block), exit from the method.

    if(empty($iProfileContentId) && bx_get('id') !== false)

           $iProfileContentId = bx_process_input(bx_get('id'), BX_DATA_INT);

    If the given profile id is empty, but the GET id variable exists, the profile id will take the value of $_GET['id'].

    $oProfile = BxDolProfile::getInstanceByContentAndType($iProfileContentId, $sProfileModule);

    The creation of $oProfile object according the given info.

    if(empty($oProfile)) 

            return array();

    if the creation of this object fails then then return the empty array, exit from the method. 

    $iProfileId = $oProfile->id();

    The taking value of $oProfile->id() field to $iProfileId variable.

    $sType = BX_BASE_MOD_NTFS_TYPE_OWNER;

    The setting the type of "post" mode.

    return $this->_getBlockPost($iProfileId, array(

                'type' => $sType,

                'form_display' => $this->_oConfig->getPostFormDisplay($sType)

            ));

    The calling _getBlockPost method with the formed parameters.