Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagephp
class ConfigboxModelExamples extends KenedoModel {

  ...
  
  function getPropertyDefinitions() {
  
    $propDefs = array();
	
	$propDefs['id'] = array(
		'name'=>'id',
		'type'=>'id',
		'label'=>KText::_('ID'),
		'listingcanSortBy'=>10>true,
		'orderpositionList'=>10,
		'positionForm' => 10,
	);
    
    ...
    
	return $propDefs;
  }
  ...
}

...

Code Block
languagephp
$propDefs['name'] = array(

   'name'=>'name',
   'type'=>'string',
   'label'=>KText::_('Name'),
   'required'=>1>true,
   
   'listingcanSortBy'=>20>true,
   'orderaddSearchBox'=>1>true,
   'search'=>1,
   
   'listinglinkmakeEditLink'=>1>true,
   'component'=>'com_configbox',
   'controller'=>'adminexamples',
   
   'positionList'=>20,
   'positionForm'=>30,

);

We call the things like 'name', 'type', 'label' etc. property settings. Most are common across all types, some are specific to a type. Here we describe the common ones:

...

Adding the DB table for the model

KenedoModel does not create the Each KenedoModel has it’s data stored in a typical DB table automatically, which you create it yourself (choosing appropriate column types, indices etc). See You add these tables with any tool you prefer - if you want to make use of a deployment scheme, see Application Update Scripts on how to create or modify tables for the base software or customization projects.

...