Methods
This library can be used to parse/generate the HTML code of a user's
profile attributes from within the whole framework.
__construct($pageContent)
To do so, follow
the following steps:
1. Initialize an object from this class and pass the target
\Cx\Core\Html\Sigma object as a paramater to it.
2. Call AccessLib::setModulePrefix() to set the \Cx\Core\Html\Sigma's
placeholders prefix. Where the passed argument would be like: ACCESS_
3. Call AccessLib::setAttributeNamePrefix() to set the
\Cx\Core\Html\Sigma's block prefix used in the user's profile attribute
template blocks. Where the passed argument would be like: access_profile_attribute
4. Finaly, call AccessLib::parseAttribute() to parse a user account's profile attribute
template block or to return the generated HTML code of a user account's profile attribute.
Example:
$objAccessLib = new AccessLib($objTemplate);
$objAccessLib->setModulePrefix('shop');
$objAccessLib->setAttributeNamePrefix('shop_customer_profile_attribute');
$objAccessLib->parseAttribute($objUser, 'firstname', 0, false, false, false, false, false);
Parameters
$pageContent
getPage()
getPage($metaPageTitle, $pageTitle)
Parameters
$metaPageTitle
$pageTitle
Returns the password information string
getPasswordInfo() : string
InheritedStatic
The string returned depends on the password complexity setting
author |
Reto Kohli |
inherited_from |
\AccessLib::getPasswordInfo() |
Returns
string
The password complexity information
handleSignUp()
handleSignUp($objUser)
This method has two purposes (see param $return):
1.
parseAttribute(\User $objUser, integer $attributeId, integer $historyId, boolean $edit, boolean $return, boolean $isChild, boolean $inFrame, boolean $useMagicBlock, array $arrAdditionalPlaceholders)
Inherited
Parse the \Cx\Core\Html\Sigma template block of a specific profile attribute
2. Generate the HTML code of a specific profile attribute and return it
inherited_from |
\AccessLib::parseAttribute() |
Parameters
$objUser
\User
User object of whoem's profile attribute shall be parsed
$attributeId
integer
ID of the profile attribute to be parsed
$historyId
integer
History version of the profile attribute to be parsed
$edit
boolean
If the profile attribute's value shall be modifyable (set to TRUE)
or not (set to FALSE)
$return
boolean
If the profile attribute's \Cx\Core\Html\Sigma template block
shall be parsed (set to FALSE) or the HTML code of the profile
attribute shall be generated and returned instead (set to TRUE).
$isChild
boolean
In case the profile attribute to be parsed is an other profile
attribute's child, set this to TRUE, otherwise to FALSE
$inFrame
boolean
In case the profile attribute to be parsed is located within an
other profile attribute of the type frame, set this to TRUE,
otherwise to FALSE
$useMagicBlock
boolean
The method can use the magic block \Cx\Core\Html\Sigma template
block access_profile_attribute_list (set to TRUE), instead of using
the profile attribute specific block like for instance
access_profile_attribute_firstname (set to FALSE)
$arrAdditionalPlaceholders
array
Pass additional, preparsed placeholders. The array must be an associated
array, where the key represents the \Cx\Core\Html\Sigma variable suffix
and the value the placeholder's value.
For instance: array('_CSS' => 'someSpecialCSSClass');
When using this library from within a different place (not access module),
use this method to specify the template block prefix to be used when parsing
a user's profile attribute.
setAttributeNamePrefix(string $prefix)
Inherited
For instance when setting the prefix to 'shop_customer_profile_attribute',
then the method {@link AccessLib::parseAttribute()) will try to parse the
\Cx\Core\Html\Sigma template block shop_customer_profile_attribute_firstname
in the case of the profile attribute firstname.
Defaults to 'access_profile_attribute'
Parameters
$prefix
string
\Cx\Core\Html\Sigma template block prefix to be used
When using this library from within a different place (not access module),
use this method to specify the template placeholder prefix to be used when
parsing a user's profile attribute.
setModulePrefix(string $prefix)
Inherited
For instance when setting the prefix to 'SHOP_', then the method
{@link AccessLib::parseAttribute()) will parse the \Cx\Core\Html\Sigma
variable SHOP_PROFILE_ATTRIBUTE_FIRSTNAME in the case of the profile
attribute firstname.
Defaults to 'ACCESS_'
Parameters
$prefix
string
\Cx\Core\Html\Sigma variable prefix to be used
addUploadedImagesToProfile()
addUploadedImagesToProfile($objUser, $arrProfile, $arrImages)
Inherited
inherited_from |
\AccessLib::addUploadedImagesToProfile() |
Parameters
$objUser
$arrProfile
$arrImages
attachJavaScriptFunction()
attachJavaScriptFunction($function)
Inherited
inherited_from |
\AccessLib::attachJavaScriptFunction() |
Parameters
$function
detachAllJavaScriptFunctions()
detachAllJavaScriptFunctions()
Inherited
inherited_from |
\AccessLib::detachAllJavaScriptFunctions() |
getJavaScriptCode()
getJavaScriptCode()
Inherited
inherited_from |
\AccessLib::getJavaScriptCode() |
parseAccountAttribute()
parseAccountAttribute($objUser, $attributeId, $edit, $value)
Inherited
inherited_from |
\AccessLib::parseAccountAttribute() |
Parameters
$objUser
$attributeId
$edit
$value
parseAccountAttributes()
parseAccountAttributes($objUser, $edit)
Inherited
inherited_from |
\AccessLib::parseAccountAttributes() |
Parameters
$objUser
$edit
parseLetterIndexList()
parseLetterIndexList($URI, $paramName, $selectedLetter)
Inherited
inherited_from |
\AccessLib::parseLetterIndexList() |
Parameters
$URI
$paramName
$selectedLetter
Parse a user's newsletter-list subscription interface
parseNewsletterLists(\User $objUser)
Inherited
inherited_from |
\AccessLib::parseNewsletterLists() |
Parameters
$objUser
\User
User object of whoem the newsletter-list subscriptions shall be parsed
removeUselessImages()
removeUselessImages()
Inherited
inherited_from |
\AccessLib::removeUselessImages() |
_getAtrributeCode()
_getAtrributeCode($objUser, $attributeId, $historyId, $edit)
Inherited
inherited_from |
\AccessLib::_getAtrributeCode() |
Parameters
$objUser
$attributeId
$historyId
$edit
checkCaptcha()
checkCaptcha()
confirmSignUp()
confirmSignUp($userId, $restoreKey)
Parameters
$userId
$restoreKey
createThumbnailOfImage()
createThumbnailOfImage($imageName, $profilePic)
Inherited
inherited_from |
\AccessLib::createThumbnailOfImage() |
Parameters
$imageName
$profilePic
Return the html code for a checkbox attribute
getCheckboxAttributeCode(string $name, string $value, boolean $edit) : string
Inherited
inherited_from |
\AccessLib::getCheckboxAttributeCode() |
Parameters
$name
string
$value
string
$edit
boolean
Returns
string
Return the html code for a date attribute
getDateAttributeCode(string $name, string $value, boolean $edit) : string
Inherited
inherited_from |
\AccessLib::getDateAttributeCode() |
Parameters
$name
string
$value
string
$edit
boolean
Returns
string
Return the html code for an email attribute
getEmailAttributeCode(string $name, string $value, boolean $edit) : string
Inherited
inherited_from |
\AccessLib::getEmailAttributeCode() |
Parameters
$name
string
$value
string
$edit
boolean
Returns
string
Return the html code for an image attribute
getImageAttributeCode($objUser, string $name, string $value, string $attributeId, string $attributeHtmlId, integer $historyId, boolean $edit, $thumbnail) : string
Inherited
inherited_from |
\AccessLib::getImageAttributeCode() |
Parameters
$objUser
$name
string
$value
string
$attributeId
string
$attributeHtmlId
string
$historyId
integer
$edit
boolean
$thumbnail
Returns
string
Return the html code for a password attribute
getPasswordAttributeCode(string $name) : string
Inherited
inherited_from |
\AccessLib::getPasswordAttributeCode() |
Parameters
$name
string
Returns
string
Return the html code for a text attribute
getTextAttributeCode(string $name, string $value, boolean $edit) : string
Inherited
inherited_from |
\AccessLib::getTextAttributeCode() |
Parameters
$name
string
$value
string
$edit
boolean
Returns
string
Return the html code for a textarea attribtue
getTextareaAttributeCode(string $name, string $value, boolean $edit) : string
Inherited
inherited_from |
\AccessLib::getTextareaAttributeCode() |
Parameters
$name
string
$value
string
$edit
boolean
Returns
string
Return the html code for an URI attribute
getURIAttributeCode(string $name, string $uri, boolean $edit) : string
Inherited
inherited_from |
\AccessLib::getURIAttributeCode() |
Parameters
$name
string
$uri
string
$edit
boolean
Returns
string
isImageWithinAllowedSize()
isImageWithinAllowedSize($size, $profilePic)
Inherited
inherited_from |
\AccessLib::isImageWithinAllowedSize() |
Parameters
$size
$profilePic
loadAccountAttributes()
loadAccountAttributes()
Inherited
inherited_from |
\AccessLib::loadAccountAttributes() |
Load the html code template of the different attribute types
loadAttributeTypeTemplates()
Inherited
global |
array |
inherited_from |
\AccessLib::loadAttributeTypeTemplates() |
loadLanguageAccountAttribute()
loadLanguageAccountAttribute()
Inherited
inherited_from |
\AccessLib::loadLanguageAccountAttribute() |
members()
members($groupId)
moveUploadedImageInToPlace()
moveUploadedImageInToPlace($objUser, $tmpImageName, $name, $profilePic)
Inherited
inherited_from |
\AccessLib::moveUploadedImageInToPlace() |
Parameters
$objUser
$tmpImageName
$name
$profilePic
parseAttributePlaceholders()
parseAttributePlaceholders($arrPlaceholders, $defined, $attributeIdUC, $frameIdUC, $childIdUC, $frame, $child)
Inherited
inherited_from |
\AccessLib::parseAttributePlaceholders() |
Parameters
$arrPlaceholders
$defined
$attributeIdUC
$frameIdUC
$childIdUC
$frame
$child
Parse the network settings page
parseNetworks(object $objUser)
Parameters
$objUser
object
the user object of the current logged in user
setLanguageCookie()
setLanguageCookie($currentLangId, $newLangId)
Parameters
$currentLangId
$newLangId
user()
user($metaPageTitle, $pageTitle)
Parameters
$metaPageTitle
$pageTitle
Properties
$defaultProfileThumbnailScaleColor
Inherited
inherited_from |
\AccessLib::$$defaultProfileThumbnailScaleColor |
$objUserFW : object
Inherited
access |
private |
inherited_from |
\AccessLib::$$objUserFW |
$_mandatorySign : string
Inherited
inherited_from |
\AccessLib::$$_mandatorySign |
$arrAccountAttributes
Inherited
inherited_from |
\AccessLib::$$arrAccountAttributes |
$arrAttachedJSFunctions : array
Inherited
access |
private |
inherited_from |
\AccessLib::$$arrAttachedJSFunctions |
$arrAttributeTypeTemplates
Inherited
inherited_from |
\AccessLib::$$arrAttributeTypeTemplates |
$attributeNamePrefix
Inherited
access |
private |
inherited_from |
\AccessLib::$$attributeNamePrefix |
$modulePrefix
Inherited
inherited_from |
\AccessLib::$$modulePrefix |