Insert Component
From Rhypedigital
Similar to the 'Test' view this component takes an active record and sets up some controls.
<?php # # File : Lib/Component/Test.php # Copyright: 2009 # : Rhype Digital Ltd # License : This file is released under the terms of the Rhype Digital Software Licence. # : Use of this software is prohibited without express permission of Rhype # : Digital Ltd. # EMail : copyright@rhypedigital.com # require_once ('RiPHPLib/MVC/View.php' ) ; require_once ('RiPHPLib/Controls/Input.php') ; class Lib_Component_Insert extends RPL_MVC_View { function __construct ($name, $arTest) { # Parent constructor is passed the path to the skeleton file. Also, # a name is passed though. # parent::__construct ('Skeleton/Component/Insert.skel', $name) ; # Pass the active record to the view. # $this->addActiveRecord ($arTest) ; # Create controls to display columns from the active record. These are # passed to the view to be used then the skeleton is rendered. # $name = new RPL_Controls_Input ($arTest, 'test_name') ; $date = new RPL_Controls_Input ($arTest, 'test_date') ; $this->addControl ($name) ; $this->addControl ($date) ; } } ?>
