This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Aadmin_Form_Users extends Zend_Form | |
{ | |
public function init() | |
{ | |
/** | |
* You would probably like to add some more filters / validators | |
* to check all things. This is meant only to be a simple example. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoloaderNamespaces[] = "ZFCrud" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Admin_Model_DbTable_Users extends ZFCrud_Model_DbTable_Abstract | |
{ | |
protected $_name = 'users'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Admin_Model_Mapper_Roles extends ZFCrud_Model_Mapper_Abstract | |
{ | |
protected $messages = array( | |
self::MESSAGE_CREATE_FAILURE => 'User couldn\'t be added.', | |
self::MESSAGE_CREATE_SUCCESS => 'User added.', | |
self::MESSAGE_DELETE_FAILURE => 'User couldn\'t be deleted.', | |
self::MESSAGE_DELETE_SUCCESS => 'User deleted.', | |
self::MESSAGE_UPDATE_FAILURE => 'User data couldn\'t be changed.', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Admin_Model_UsersEntity extends ZFCrud_Model_EntityAbstract | |
{ | |
protected $id; | |
protected $name; | |
protected $login; | |
protected $password; | |
protected $email; | |
protected $date_created; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `users` ( | |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
`name` varchar(100) NOT NULL, | |
`login` varchar(30) NOT NULL, | |
`password` varchar(128) NOT NULL, | |
`email` varchar(250) NOT NULL, | |
`date_created` int(10) unsigned NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Admin_UsersController extends ZFCrud_Controller_Crud_Abstract | |
{ | |
//no code! | |
} |
NewerOlder