How to upload a file like image, video and audio
-
zendnwar
-
May 7, 2012
-
Zend basic
-
0 Comments
just follow the instruction i hope will be work nicely. At first create a url path for upload. public/index.php defined ( ‘UPLOAD_PATH’ ) || define ( ‘UPLOAD_PATH’, realpath ( dirname ( __FILE__ ) . ‘/../docs’ ) );// “/../docs” your file location where u want to upload your file. In your form just add below element tag. $image = new Zend_Form_Element_File …
Continue Reading
Populating DB data to a Zend Form dropdown element
-
zendnwar
-
May 4, 2012
-
Zend basic
-
11 Comments
$country_name = new Zend_Form_Element_Select(‘c_id’, array( ‘decorators’ => $this->elementDecorators, ‘label’ => ‘COUNTRY’, ‘attribs’ => array(‘id’ => ‘c_id’, ‘class’ => ‘input-text-field’), ‘required’ => true, ‘filters’ => array(‘StringTrim’) )); $c_table = new Application_Model_DbTable_Country(); foreach ($c_table->findForSelect() as $c) { $country_name->addMultiOption($c->c_id, $c->c_name); } //Application/Model/DbTable/Country.php class Application_Model_DbTable_Country extends Zend_Db_Table_Abstract { protected $_name = ‘country’;//’country is a table name’ public function findForSelect() { $select = $this->select(); return …
Continue Reading
How to Add HTML into Zend_Form_Element label
-
zendnwar
-
April 30, 2012
-
Zend basic
-
246 Comments
This is very simple add a html into Zend_Form_Element label just follow given code i hope it will be help for u. $checkbox->setLabel(‘ <a href=”/auth/forgot”> Forgot Password </a>’); $element->setDecorators(array(array(‘Label’, array(‘escape’ => false)))); This worked for the HTML part as my link now appeared, but I didn’t see my checkbox, just the label. So looking at the method name I …
Continue Reading
Using the CLI Tool
-
zendnwar
-
April 11, 2012
-
Zend basic
-
213 Comments
Version zf show version mode=mini name-included=1 Note: There are specialties, use zf show version.? to get specific help on them. Config zf create config zf show config zf enable config Note: There are specialties, use zf enable config.? to get specific help on them. zf disable config Note: There are specialties, use zf disable config.? to get specific help …
Continue Reading
What is Zend Framework?
-
zendnwar
-
April 11, 2012
-
Zend basic
-
1 Comment
Zend Framework is a fully object-oriented framework,it is utilizes a lot of object-oriented (OO) concepts like object, class, inheritance and interfaces. Zend Framework components extendable to some point. It allows developers to implement their own special variations of individual components without having to hack into the ZF codebase itself. Zend Framework is very simple, straightforward, open-source software framework. Its strength …
Continue Reading