Download the PHP package labcoding/feedback without Composer
On this page you can find all versions of the php package labcoding/feedback. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download labcoding/feedback
More information about labcoding/feedback
Files in labcoding/feedback
Package feedback
Short Description ZF2 feedback Module
License BSD-3-Clause
Homepage https://github.com/labcoding/feedback
Informations about the package feedback
ZF2 Feedback module
Installation
Add this project in your composer.json:
Now tell composer to download Domain by running the command:
OR
Run command in console
Post installation
Enabling it in your application.config.php
file.
Then you need creating DB table `feedback.'
CREATE TABLE IF NOT EXISTS `feedback` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(50) DEFAULT null, `email` VARCHAR(100) DEFAULT null, `message` TEXT, `answer` TEXT EFAULT NULL, `created_dt` DATETIME NOT NULL, `updated_dt` DATETIME NOT NULL, `status` TINYINT(1) DEFAULT 1, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
OR run console command:
And the last, copy to your public folder javascript files: feedback.jfeedbacker.js(they mast located in js/module/feedback
feedbackand include partial
wear you want to see feedback ffeedbacke>
<?= $this->partial('partials/feedback-form.phtml'); ?>
Events
Feedback
events arise when user send feedback ofeedbacksent answer to user.
FeedbackEvent::EVENT_NEW_FEEDBACK
-new.feedback
- arise after a user left feedback ofeedbackte and data save in DB.FeedbackEvent::EVENT_SEND_ANSWER
-send.answer
- appear after admin click to "Send" button and data updated in DB.
Add new field to feedback (form, table, entity)
1 - Create in your project module Feedback
2 - Add to config new entity map structure:
'entity_map' => [ 'Feedback' => [ 'entityClass' => \Feedback\Domain\Feedback::class, 'table' => 'feedback', 'primaryKey' => 'id', 'columnsAsAttributesMap' => [ 'id' => 'id', 'name' => 'name', 'phone' => 'phone', // it is new field 'email' => 'email', 'message' => 'message', 'answer' => 'answer', 'created_dt' => 'createdDt', 'updated_dt' => 'updatedDt', 'status' => 'status', ], 'criteriaMap' => [ 'id' => 'id_equalTo', ] ], ]
3 - Create new Feedback entity file, extends it from \LabCoding\Feedback\Domain\Feedback
, and add new property:
4 - Crete new input filter, and add it to service manager:
5 - At the last add new field to feedback form
All versions of feedback with dependencies
zendframework/zend-db Version ~2.5.0
zendframework/zend-mvc Version ~2.5.0
zendframework/zend-servicemanager Version ~2.5.0
zendframework/zend-eventmanager Version ~2.5.0
t4web/infrastructure Version ~1.2.0
t4web/domain-module Version ~1.2.0
t4web/crud Version ~1.0.0