Editing
Variable-Length Line Item Edits
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== PHP === Create a PHP class to represent the line item records. <syntaxhighlight lang="php"> require_once (COMMON_CLASS_DIR."db/db_content_class.php"); class ContentTemplate extends db_content_class { public $id; public $name; public $site_section_id; public $base_dir; public $path; public $location; public $parent_id; const SECTION_ID = 33; function __construct( $id=null, $parent_id=null, $name='', $base_dir='', $path='', $location='') { $this->id = new integer_input_class("Template id", "templateID", true, $id); $this->site_section_id = new integer_input_class("templateParentid", "contentTypeID", true, $parent_id); $this->name = new string_text_input_class("Name", "templateName", true, $name, 45); $this->path = new string_text_input_class("Path", "templatePath", true, $path, 255); $this->location = new string_select_input_class("Location", "templateLocation", false, $location, 20); $this->parent_id = &$this->site_section_id; } /* [...] */ } </syntaxhighlight> * The class must have `parent_id` property. ** If the class has property that links it to the parent record but isn't named "parent_id" (as in the example above with the `site_section_id`), then add a `$parent_id` property and point it to the existing property in the class's constructor:<br />`$this->parent_id = &$this->site_section_id;` * Add an include for the class in the project's local `cache_class.php`.
Summary:
Please note that all contributions to Littledamien Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Littledamien Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information