/** * ContentProperties constructor. * * @param int|null $id Initial id value */ function __construct($id = null) { parent::__construct(); $this->id = new IntegerInput("Id", self::ID_PARAM, null, true); $this->format = new StringSelect("Image format", 'cpFormat', '', false, 4); $this->gallery_thumbnail = new BooleanCheckbox("Has gallery thumbnail", "cpGallThumb", false, false); $this->height = new IntegerTextFIeld("Target image height", "cpImgH", null, false); $this->image_label = new StringTextField("Image label", "cpImgLabel", '', false, 100); $this->image_path = new StringTextField("Image path", "cpImgPath", '', false, 255); $this->is_cached = new BooleanCheckbox("Cached", "cpCached", false, false); $this->med_height = new IntegerSelect("Medium-sized image target height", "cpMedH", null, false); $this->med_width = new IntegerSelect("Medium-sized image target width", "cpMedW", null, false); $this->mini_height = new IntegerSelect("Small-sized image target height", "cpMiniH", null, false); $this->mini_width = new IntegerSelect("Small-sized image target width", "cpMiniW", null, false); $this->name = new StringTextField("Name", "cpName", '', true, 50); $this->param_prefix = new StringTextField("Parameter prefix", "cpParamPrefix", '', false, 8); $this->parent_id = new IntegerSelect("Parent", "cpParentId", null, false); $this->root_dir = new StringTextField("Root path", "cpRoot", '', false, 255); $this->slug = new StringTextField("Slug", "cpSlug", '', false, 50); $this->sub_dir = new StringTextField("Sub-directory path", "cpSubPath", '', false, 255); $this->table = new StringTextField("Table name", "cpTable", '', true, 50); $this->width = new IntegerSelect("Target image width", "cpImgW", null, false); $this->id_param = ''; $this->label = ''; $this->parent = ''; }
/** * ContentTemplate constructor. * * @param int|null $id Initial record id * @param int|null $parent_id Initial parent id value * @param string $name Initial name value * @param string $root_path Initial base directory value * @param string $path Initial template path value * @param string $location Initial template location value */ function __construct($id = null, $parent_id = null, $name = '', $root_path = '', $path = '', $location = '') { parent::__construct(); $this->id = new IntegerInput("Template id", "templateID", $id, false); $this->site_section_id = new IntegerInput("templateParentid", "contentTypeID", $parent_id, true); $this->name = new StringTextField("Name", "templateName", $name, true, 45); $this->path = new StringTextField("Path", "templatePath", $path, true, 255); $this->location = new StringTextField("Location", "templateLocation", $location, false, 20); /* pointer to site section id for the benefit of editing these * records in the CMS */ $this->parent_id =& $this->site_section_id; /* ensure this has a trailing slash */ $this->rootPath = rtrim($root_path, '/') . '/'; }
function __construct() { parent::__construct(); $this->id = new IntegerInput("Id", "capId", null, false); $this->section_id = new IntegerSelect("Content type", "capContentType", null, true); $this->label = new StringTextField("Label", "capLabel", "", true, 50); $this->id_param = new StringTextField("Id parameter name", "capKeyName", "", true, 50); $this->listings_uri = new StringTextField("Listings URI", "capListURI", "", false, 255); $this->details_uri = new StringTextField("Details URI", "capDetailsURI", "", false, 255); $this->edit_uri = new StringTextField("Edit URI", "capEditURI", "", false, 255); $this->upload_uri = new StringTextField("Upload URI", "capUploadURI", "", false, 255); $this->delete_uri = new StringTextField("Detlete URI", "capDeleteURI", "", false, 255); $this->cache_uri = new StringTextField("Cache URI", "capCacheURI", "", false, 255); $this->sorting_uri = new StringTextField("Sorting URI", "capSortURI", "", false, 255); $this->keywords_uri = new StringTextField("Keywords URI", "capKeywordsURI", "", false, 255); $this->comments = new StringTextarea("Comments", "capComments", "", false, 2000); $this->is_sortable = new BooleanCheckbox("Is sortable", "capIsSortable", false, false); }