Articles for Zend

Tweet When setting your Zend Form with Select field you don’t always wish to have label on that filed but rather “Select one” as a first option. Setting the required flag on Zend Select, or adding notEmpty validator won’t always work especially if your box is being populated dynamically. Let’s say you have something like [...]

Tweet CSRF or Cross-Site Request Forgery is basically a way of requesting an unauthorized commands from a website by using an authorised user. For example: Let’s assume that you are logged in on your blog and I know that. I could then send you an e-mail with following content: <img src=”http://yoursite.com/?action=delete-article&id=12″ />. Although you wouldn’t [...]

Tweet Have you ever wondered if you could let user see his website visits on his own admin page without having to leave backend of his system? I have… Actually – the CMS I made for my clients (written in Zend Framework) has this option for quite some time, and users love it. So – [...]

Tweet There is an easy way to get current domain name in Zend Framework. To get domain name in Zend Framework – use following snippet in your view file. echo $this->serverUrl();

Zend no render

In: PHP

23 Jul 2010

Tweet In order to prevent page to render in Zend Framework use following snippet. Zend no render: 1 $this->getHelper(’viewRenderer’)->setNoRender(); In order to disable layout use both lines as shown in snippet below: 1 2 $this->getHelper(’viewRenderer’)->setNoRender(); $this->_helper->layout->disableLayout();

Zend date

In: PHP

5 Jul 2010

Tweet To format Zend date by local settings of your multilingual website can be done easy if you are using following script. This script shows you a simple usage of Zend date you will be using when want to format date according to locale settings of current language on your multilingual website. 1 2 $date [...]

Zend Feed

In: PHP

30 Jun 2010

Tweet To create RSS Feed using Zend Feed, you can use following code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 $items = array(0, 1, 2, 3);   foreach ($texts AS $text) $items[] = array( ‘title’ => ‘Zend Feed title’, ‘link’ => [...]

Zend URL

In: PHP

29 Jun 2010

Tweet To build URL with Zend Framework, you should use: echo $this->url(array $urlOptions = array(), $name = null, $reset = false, $encode = true); so, in order to use Zend URL, use following: echo $this->url(array(’module’ => ‘moduleName’, ‘controller’ => ‘controllerName’, ‘action’ => ‘actionName’), null, true);

Make Magento Checkout Awesome