<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
*
* NOTE:
* This controller does not generate tables, you must predefine you table.
*
*/
include("codexcontroller.php");
class Category extends codexController
{
function Category ()
{
// Load the CodexController
codexController::codexController();
// We include the spyc library
// So that we can define our form
// in a YAML file as opposed to
// hand-writing the array in $config
$this->load->library('spyc');
// To make the field names more human
// friendly
$this->load->helper('inflector');
/*
* ===================================
* ADDING VALIDATION
* ===================================
*
* If you would like to add form
* validation, then define your
* rules in the following format:
*
* $rules['field_name'] = "rules";
*
* then in your $config array below:
*
* 'rules' => $rules,
*
* ===================================
*/
$config = array(
'db_table' => 'category', //The name of the table associated with this controller
'form_setup' => $this->spyc->YAMLLOAD('definitions/category_form.yml'), //The array that holds our elements
'controller_name' => 'Category', //The name of the controller, so that it can be used when generating the URLs
'list_text' => array('title'), //The fields to be displayed in the "overview" view
);
$this->setConfig($config);
$this->load->scaffolding('category');
}
}
?>
error string
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Image::$CI
Filename: plugins/image.php
Line Number: 36
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: plugins/image.php
Line Number: 36
Fatal error: Call to a member function library() on a non-object in Z:\home\site\www\codex\application\plugins\image.php on line 36