Welcome Guest, Not a member yet? Register   Sign In
Help understanding codeigniter MVC
#7

If you use Form in your HMVC then you need to have this:

PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

/**
 * Class MY_Form_validation
 *
 * ./application/libraries/MY_Form_validation.php
 *
 * USAGE:
 *
 * if ($this->form_validation->run($this) == FALSE)
 * {
 *     // Load the form view
 * }
 * else
 * {
 *     // Form Success view
 * }
 *
 * So that HMVC can use CI Forms and callbacks.
 */

class MY_Form_validation extends CI_Form_validation
{
    
/**
     * @var
     * _ci Super Global
     */
    
public $_ci;

    
/**
     * run ()
     * ---------------------------------------------------------------------------
     *
     * @param   string $module
     * @param   string $group
     * @return  bool
     */
    
public function run($module ''$group '')
    {
        (
is_object($module)) AND $this->_ci =& $module;

        return 
parent::run($group);
    }


What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Help understanding codeigniter MVC - by InsiteFX - 11-05-2016, 05:11 AM
RE: Help understanding codeigniter MVC - by PaulD - 11-08-2016, 06:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB