User Tools

Site Tools


introduction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
introduction [2020/09/01 00:57]
admin [Translations]
introduction [2020/09/01 00:59] (current)
admin
Line 142: Line 142:
 Please note prior to LiteCart 2.2.0 entity objects used the prefix ctrl_ instead of ent_. Please note prior to LiteCart 2.2.0 entity objects used the prefix ctrl_ instead of ent_.
  
-===== Reference Objects ===== 
- 
-Reference objects are **read-only** class objects that can dynamically **return partial parts of a data set**. 
- 
-The reference objects are of factory design. They do not possess a whole set of data, but fetches it for you once requested. 
- 
-Access the database and output the english product name for a product: 
- 
-<file>$product = new ref_product(id); 
-echo $product->name;</file> 
- 
-Or 
- 
-<file>echo reference::product(id)->name;</file> 
 ===== Internal Links ===== ===== Internal Links =====
  
Line 185: Line 171:
  
 <file>echo language::translate('title_hello_world', 'Hello World'); </file> <file>echo language::translate('title_hello_world', 'Hello World'); </file>
 +
 +===== Reference Objects =====
 +
 +Reference objects are **read-only** class objects that can dynamically **return partial parts of a data set**.
 +
 +The reference objects are of factory design. They do not possess a whole set of data, but fetches it for you once requested.
 +
 +Access the database and output the english product name for a product:
 +
 +<file>$product = new ref_product(id);
 +echo $product->name;</file>
 +
 +Or
 +
 +<file>echo reference::product(id)->name;</file>
  
 ===== Template Layouts ===== ===== Template Layouts =====
Line 202: Line 203:
  
 ===== Template Views ===== ===== Template Views =====
- 
  
 LiteCart tries to separate logic from the user interface code by the use of views. LiteCart tries to separate logic from the user interface code by the use of views.
introduction.txt ยท Last modified: 2020/09/01 00:59 by admin