/** * @param array $info * @param bool $isGroupsExist * @param bool $isAuthorized */ function __construct($info = array(), $isGroupsExist = false, $isAuthorized = false) { $this->commonFields = parent::getCommonFields(); $this->postingFields = self::getPostingFields(); $this->systemFields = self::getSystemFields($isGroupsExist, $isAuthorized); $detailsInfo = self::getDetails($this->commonFields, $isGroupsExist, $isAuthorized); $locationPrefix = ''; foreach ($detailsInfo as $index => $propertyInfo) { $sortArray[$index] = $propertyInfo['order']; if ($propertyInfo['type'] == 'location') { $locationPrefix = $propertyInfo['id']; } } $sortArray = SJB_HelperFunctions::array_sort($sortArray); foreach ($sortArray as $index => $value) { $sortedDetailsInfo[$index] = $detailsInfo[$index]; } foreach ($sortedDetailsInfo as $detailInfo) { $detailInfo['value'] = ''; if (isset($info[$detailInfo['id']])) { $detailInfo['value'] = $info[$detailInfo['id']]; } elseif ($detailInfo['id'] == 'post_template') { $detailInfo['value'] = '{$user.CompanyName}: {$listing.Title} ({$listing.' . $locationPrefix . '.City}, {$listing.' . $locationPrefix . '.State})'; } $this->properties[$detailInfo['id']] = new SJB_ObjectProperty($detailInfo); } }
public function SJB_FacebookSocialDetails($info) { $this->commonFields = parent::getCommonFields(); $this->postingFields = self::getPostingFields(); $this->systemFields = self::getSystemFields(); $detailsInfo = self::getDetails($this->commonFields); $sortArray = array(); $locationPrefix = ''; foreach ($detailsInfo as $index => $propertyInfo) { $sortArray[$index] = $propertyInfo['order']; if ($propertyInfo['type'] == 'location') { $locationPrefix = $propertyInfo['id']; } } $sortArray = SJB_HelperFunctions::array_sort($sortArray); foreach ($sortArray as $index => $value) { $sortedDetailsInfo[$index] = $detailsInfo[$index]; } foreach ($sortedDetailsInfo as $detailInfo) { $detailInfo['value'] = ''; $accountID = SJB_Request::getVar('account_id', false); if (isset($info[$detailInfo['id']])) { $detailInfo['value'] = $info[$detailInfo['id']]; } elseif ($detailInfo['id'] == 'hash_tags') { $detailInfo['value'] = '#Jobs'; } elseif ($detailInfo['id'] == 'post_template') { $detailInfo['value'] = '{$user.CompanyName}: {$listing.Title} ({$listing.' . $locationPrefix . '.City}, {$listing.' . $locationPrefix . '.State})'; } elseif (isset($accountID) && $detailInfo['id'] == 'account_id') { $detailInfo['value'] = $accountID; } $this->properties[$detailInfo['id']] = new SJB_ObjectProperty($detailInfo); } }
function SJB_FacebookSocial($info = array()) { $this->db_table_name = 'facebook_feeds'; $this->details = new SJB_FacebookSocialDetails($info); $this->common_fields = SJB_SocialMediaDetails::getCommonFields(); }