Developer Guide / April 4, 2017

Entity System - Property Type

What is Type Entity? Type entity is a PHP class for managing property type entity Create Revise Update and Delete process. The purpose of this class is to act as the general gateway object for other to use.

What is property type? Property type is actually a Taxonomy with Terms that is mapped in a single options table entry as serialized array. The maps will act as the key for storing types additional options such as bundled Fields and Attributes. Which allows user to have different settings and bundles for each different kind of types. Available Hook actions Property plugin Type Entity is alterable via hooks :

Hook Action – vtcore_property_type_init This hook is invoked as the last action when the type entity is constructed.

Hook Action – vtcore_property_type_after_entity_load This action is invoked after the type entity object finished loading type entity data from database into the object.

Hook Action – vtcore_property_type_before_entity_save This action is triggered before the type entity object attempt to update the stored entity entry in the database.

Hook Action – vtcore_property_type_after_entity_save This action is triggered after the type entity object performing saving type array into the database regardless whether the saving process is success or failed.

Hook Action – vtcore_property_type_before_entity_delete This action is triggered before the actual data removal from the database.

Hook Action – vtcore_property_type_after_entity_delete This action is triggered after the data is removed from the database.

Example on altering types entity

 

/**
 * Hooking into type entity init hook 
 */
add_action('vtcore_property_type_init', 'alter_my_type'); 

function alter_my_type($object) { 

  /**
   * Use dotted notation and object getter
   * Just a simple demonstration to change all the 
   * type form label
   */
  $object->mutate('label', 'Newly altered label');
 
}

Related Product

WordPress Property Real Estate Plugin

VT Property is a WordPress plugin for Real estate and Properties sites. You can have unlimited attributes for the properties and create multiple agents as user. Available Features Ajax search form Custom property icon Different property attributes Different property types Visual composer ready Property marker within maps Custom marker u...
View Product

Related Documentation

Entity System - Property Factory

Entity System - Property Factory

What is Property Entity Factory? Property entity factory is the PHP class wrapper for building a property entity object based on data from a property post data. The class will build all relevant type entity, field entities and attribute entities related to a single post entry. I...
Creating agents listing template

Creating agents listing template

If there is no valid agents listing page then the plugin will use author.php template which will display all author posts instead of listing of agents. Therefore it is strongly suggested to create a custom agents listing template in your theme. Step One – Locate theme...
Field System - Display Object

Field System - Display Object

/** * Class for building the field status * * @author [email protected] * */ class VTCore_Property_Element_Status extends VTCore_Property_Models_Element { /** * Define the default context array * The context will be merged with user supplied context ...
Creating property archive template

Creating property archive template

It is recommended to create a separate archive template for property rather than using theme default archive.php or index.php. Step One – Locate theme file You will need to locate theme archive.php or index.php which usually located in the root folder of your theme. Step...
Field System - Search Query Vars

Field System - Search Query Vars

When a custom property field is marked as allowed for searching there are couple of extra steps needed to register the query variables so it will be eligible when WP_Query is processing the actual query. Step One – Register the searched variable key When Building the Prope...
Creating property single template

Creating property single template

It is recommended to create a separate single page template for property rather than using theme default page.php or single.php or index.php. Step One – Locate theme file You will need to locate theme page.php or single.php or index.php which usually located in the root f...
Entity System - Property Field

Entity System - Property Field

What is Field Entity? Field entity is a PHP class for wrapping all operations such as creating, updating and disabling the property field system. It is recommended to use the class object when trying to manipulate the field system as many logic and hooks is will be invoked inside...
Field System - Field Hooks

Field System - Field Hooks

Property plugin Fields System is alterable via hooks : Hook Filter – vtcore_property_alter_fields This filter allows you to modify, remove or add fields into the field registration, It will be fired when VTCore_Property_Fields object is created Hook Action – vtcore_...
Field System - Configuration Array

Field System - Configuration Array

The Field System Array is designed to store field related information, the information will be used in various objects under different circumstances. Like for example the translation key will be used as the array key map when integrating field dynamic strings to WPML plugin for t...
Field System - Search Object

Field System - Search Object

When a registered field is called via Property Factory to build its markup for search field display purposes, the field system will search for the entry value of objects.search in the field configuration array and when found, the entry value will be treated as the class name...
Entity System - Property Attributes

Entity System - Property Attributes

What is Attributes Entity? Attributes entity object is a PHP class for managing the Property Attributes entry to a property type. It is recommended to use this class when need to alter a Property Attributes programatically only. What is property attributes? Property Attributes i...
Creating agents profile template

Creating agents profile template

If there is no valid agents profile page then the plugin will use author.php template which will display all author posts instead the agents profile page. Therefore you must create a custom agents profile template to display the author profile information. Step One – ...
Overriding Plugin Templates

Overriding Plugin Templates

You can override all templates found in victheme_property/templates folder by creating an new folder with this structure templates/property/ in the root of your theme. Then copy the templates files that you want to override from victheme_property/templates folder into the newly ...
Overriding plugin assets

Overriding plugin assets

You can override any of the VicTheme Property or VicTheme Agents or VicTheme Core plugins default CSS and Javascript assets by registering a new assets to replace the old assets. For example, to override the property-front.css which is bundled inside the property-front assets yo...
Video Documentation

Video Documentation

How To Create Agents How to create property attributes How to create and manage property type How to configure teaser element How to add video on property pag...