Class Socialveo\Core\models\UserSocialProfile

InheritanceSocialveo\Core\models\UserSocialProfile » Socialveo\Core\models\SocialveoModel » Phalcon\Mvc\Model
Uses TraitsSocialveo\Core\Translatable

Class UserSocialProfile

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__get() Magic method to get related records using the relation alias as a property or getters defined by setGetter() Socialveo\Core\models\SocialveoModel
__isset() Magic method to check if a property is a valid relation Socialveo\Core\models\SocialveoModel
__set() Magic method to set related records using the relation alias as a property or setters defined by setSetter() Socialveo\Core\models\SocialveoModel
_t() Gets translations Socialveo\Core\Translatable
behaviors() Behaviors Socialveo\Core\models\UserSocialProfile
behaviorsNotify() Behavior notify Socialveo\Core\models\SocialveoModel
cachedFind() Returns query results from cache (if set and not expired) or database Socialveo\Core\models\SocialveoModel
change() Changes object attributes based on passed-in payload data, saves object and returns it Socialveo\Core\models\SocialveoModel
createObject() Creates an object using passed-in payload data Socialveo\Core\models\SocialveoModel
deleteObject() Deletes an object (soft-delete) Socialveo\Core\models\SocialveoModel
deleteTargetIndex() Delete target index Socialveo\Core\models\SocialveoModel
fetchObjects() Fetches the provided objects and returns them in an array Socialveo\Core\models\SocialveoModel
fetchProfile() Fetches user profile data from Provider and stores them as JSON in "profile" attribute Socialveo\Core\models\UserSocialProfile
filteredFind() Returns query results filtered by GET user-parameters, optionaly cached Socialveo\Core\models\SocialveoModel
findFirstByUuid() Find first model by uuid Socialveo\Core\models\SocialveoModel
fire() Fire event Socialveo\Core\models\SocialveoModel
forUpdate() Socialveo\Core\models\SocialveoModel
getActiveDeleted() Returns whether model is deleted Socialveo\Core\models\SocialveoModel
getActiveOk() Socialveo\Core\models\SocialveoModel
getActivePaymentProcess() Socialveo\Core\models\SocialveoModel
getAll() Get all Socialveo\Core\models\UserSocialProfile
getAllProviders() Returns a socialProfile object of a given provider for a given user uuid, by giving status Socialveo\Core\models\UserSocialProfile
getAttributes() Get model meta data attributes Socialveo\Core\models\SocialveoModel
getAttributesStatic() Get models metadata attributes Socialveo\Core\models\SocialveoModel
getByProvider() Returns a socialProfile object of a given provider for a given user uuid Socialveo\Core\models\UserSocialProfile
getByProviderId() Get by provider_id Socialveo\Core\models\UserSocialProfile
getByUserUuid() Returns a socialProfile object of a given provider for a given user uuid Socialveo\Core\models\UserSocialProfile
getChangedFields() Returns a list of changed values Socialveo\Core\models\SocialveoModel
getData() Getter override Socialveo\Core\models\UserSocialProfile
getEventsManagerInstance() Returns models Events Manager Socialveo\Core\models\SocialveoModel
getGetters() Return getters Socialveo\Core\models\SocialveoModel
getIsOwner() Check if user is owner of resource Socialveo\Core\models\SocialveoModel
getLastQueryFullCount() Socialveo\Core\models\SocialveoModel
getModel() Get model Socialveo\Core\models\SocialveoModel
getObjectByParam() Fetches an object based on passed array Socialveo\Core\models\SocialveoModel
getObjectTypeByParam() Returns an resource type based on request URI Socialveo\Core\models\SocialveoModel
getPaymentIsOk() Returns true if is payment ok Socialveo\Core\models\SocialveoModel
getRealOwner() Return real owner Socialveo\Core\models\SocialveoModel
getResourceType() Returns a string resource name of the Object (singular form) Socialveo\Core\models\SocialveoModel
getScenario() Socialveo\Core\models\SocialveoModel
getSetters() Return setters Socialveo\Core\models\SocialveoModel
getSource() Define table mapping Socialveo\Core\models\UserSocialProfile
getSourceTable() Returns the source table Socialveo\Core\models\SocialveoModel
getTarget() Returns target object Socialveo\Core\models\SocialveoModel
getTargetObject() Returns the target object by target_id and target_type Socialveo\Core\models\SocialveoModel
getTargetObjectFromArray() Fetches an object based on passed array Socialveo\Core\models\SocialveoModel
getTargetType() Returns target type Socialveo\Core\models\SocialveoModel
getUuidsObjects() Fetch objects passed in array Socialveo\Core\models\SocialveoModel
hasChanged() Check if a specific attribute has changed This only works if the model is keeping data snapshots Socialveo\Core\models\SocialveoModel
initBehaviors() Init behaviors Socialveo\Core\models\SocialveoModel
initialize() Initialize method for model Socialveo\Core\models\UserSocialProfile
inviteContacts() Sends email invitations to user contacts Socialveo\Core\models\UserSocialProfile
isModel() Check if called class and the model name is the same Socialveo\Core\models\SocialveoModel
isNew() Checks whether model is new Socialveo\Core\models\SocialveoModel
isNewRecord() Checks whether model is new Socialveo\Core\models\SocialveoModel
isSkipValidation() Is skip validation Socialveo\Core\models\SocialveoModel
onConstruct() OnConstruct event model Socialveo\Core\models\SocialveoModel
pluralize() Transforms words from singular to plural Socialveo\Core\models\SocialveoModel
providerIsSupported() Checks whether the given provider is supported Socialveo\Core\models\UserSocialProfile
readAttribute() Read attribute from getter Socialveo\Core\models\SocialveoModel
repost() Attempts to repost given content using a SocialProfile of given provider Socialveo\Core\models\UserSocialProfile
resourceToModel() Transforms a resource name string to a Model name (if such model exists) Socialveo\Core\models\SocialveoModel
resultsetToJson() Returns an array of typed arrays, ready to be json_encoded Socialveo\Core\models\SocialveoModel
retrieve() Returns object from cache (if set and not expired) or database Socialveo\Core\models\SocialveoModel
setGetter() Set getter Socialveo\Core\models\SocialveoModel
setProviderProfile() Set a provider profile Socialveo\Core\models\UserSocialProfile
setScenario() Socialveo\Core\models\SocialveoModel
setSetter() Set setter Socialveo\Core\models\SocialveoModel
setTargetObject() Set target_id and target_type Socialveo\Core\models\SocialveoModel
singularize() Transforms words from plural to singular Socialveo\Core\models\SocialveoModel
t() Gets translations Socialveo\Core\Translatable
toJson() Returns a typed array ready to be json_encoded Socialveo\Core\models\SocialveoModel
updateFields() Update only custom fields Socialveo\Core\models\SocialveoModel
userHasAccess() Returns true if user has access to resource, otherwise false Socialveo\Core\models\SocialveoModel
validation() Validations Socialveo\Core\models\UserSocialProfile
writeAttribute() Write attribute using setter Socialveo\Core\models\SocialveoModel

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
_postSaveRelatedRecords() Override default method for turn off auto-updating related records Socialveo\Core\models\SocialveoModel
_preSaveRelatedRecords() Override default method for turn off auto-updating related records Socialveo\Core\models\SocialveoModel
afterFetch() After fetch hook Socialveo\Core\models\SocialveoModel
afterSave() After save hook Socialveo\Core\models\SocialveoModel
afterUpdate() After update hook Socialveo\Core\models\SocialveoModel
beforeCreate() Before create hook Socialveo\Core\models\SocialveoModel
beforeDelete() Before delete hook Socialveo\Core\models\SocialveoModel
beforeSave() Before save hook Socialveo\Core\models\SocialveoModel
beforeUpdate() Before update hook Socialveo\Core\models\SocialveoModel
getUser() Returns user model of the currently logged in (or passed-in) user Socialveo\Core\models\SocialveoModel

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
ACTIVE_DELETE 0 Delete Socialveo\Core\models\SocialveoModel
ACTIVE_OK 1 Active Socialveo\Core\models\SocialveoModel
ACTIVE_PROCESS_PAYMENT 2 Payment process Socialveo\Core\models\SocialveoModel
SCENARIO_DEFAULT 'default' Socialveo\Core\models\SocialveoModel
SCENARIO_DELETE 'delete' Socialveo\Core\models\SocialveoModel
SCENARIO_PAYMENT 'payment' Socialveo\Core\models\SocialveoModel
SCENARIO_SAVE_USER 'save_user' Socialveo\Core\models\SocialveoModel
SCENARIO_SKIP_VALIDATION 'skip_validation' Socialveo\Core\models\SocialveoModel

Property Details

$active public property (available since version 1.0)
public integer $active null
$created public property (available since version 1.0)
public integer $created null
$data public property (available since version 1.0)
public string $data null
$id public property (available since version 1.0)
public integer $id null
$profile public property (available since version 1.0)
public string $profile null
$provider public property (available since version 1.0)
public string $provider null
$provider_id public property (available since version 1.0)
public integer $provider_id null
$updated public property (available since version 1.0)
public integer $updated null
$user_id public property (available since version 1.0)
public integer $user_id null
$user_uuid public property (available since version 1.0)
public string $user_uuid null
$uuid public property (available since version 1.0)
public string $uuid null

Method Details

behaviors() public method (available since version 1.0)

Behaviors

public array behaviors ( )
fetchProfile() public method (available since version 1.0)

Fetches user profile data from Provider and stores them as JSON in "profile" attribute

public void fetchProfile ( )
getAll() public static method (available since version 1.0)

Get all

Returns an array of socialProfile names for a given user (list of authenticated providers, where the user has an active status)

public static Socialveo\Core\models\UserSocialProfile[] getAll ( $user_uuid )
$user_uuid string
getAllProviders() public static method (available since version 1.0)

Returns a socialProfile object of a given provider for a given user uuid, by giving status

public static Socialveo\Core\models\UserSocialProfile[] getAllProviders ( $user_uuid )
$user_uuid string
getByProvider() public static method (available since version 1.0)

Returns a socialProfile object of a given provider for a given user uuid

public static Socialveo\Core\models\UserSocialProfile getByProvider ( $user_uuid, $provider )
$user_uuid string

User uuid

$provider string

Provider name

getByProviderId() public static method (available since version 1.0)

Get by provider_id

Returns a socialProfile object of a given provider for a given user provider identifier

public static Socialveo\Core\models\UserSocialProfile|boolean getByProviderId ( $provider_id, $provider )
$provider_id string
$provider string
getByUserUuid() public static method (available since version 1.0)

Returns a socialProfile object of a given provider for a given user uuid

public static Socialveo\Core\models\UserSocialProfile|boolean getByUserUuid ( $user_uuid, $provider )
$user_uuid string
$provider string
getData() public method (available since version 1.0)

Getter override

public null getData ( )
getSource() public method (available since version 1.0)

Define table mapping

public mixed getSource ( )
initialize() public method (available since version 1.0)

Initialize method for model

public void initialize ( )
inviteContacts() public method (available since version 1.0)

Sends email invitations to user contacts

public boolean inviteContacts ( )
providerIsSupported() public static method (available since version 1.0)

Checks whether the given provider is supported

public static boolean providerIsSupported ( $provider )
$provider string
repost() public static method (available since version 1.0)

Attempts to repost given content using a SocialProfile of given provider

public static boolean repost ( $user_uuid, $provider, $content )
$user_uuid string
$provider string
$content string
setProviderProfile() public static method (available since version 1.0)

Set a provider profile

Creates or updates a UserSocialProfile object for a specified user, provider, with data passed in as an argument. Object is stored in the database.

public static boolean setProviderProfile ( $user_uuid, $provider, $provider_id, $data )
$user_uuid string
$provider string
$provider_id integer
$data mixed
validation() public method (available since version 1.0)

Validations

public boolean|void validation ( )