Skip to content

Commit e211519

Browse files
Reza JelvehMartin Grenfell
Reza Jelveh
authored and
Martin Grenfell
committed
readded some custom snippets for one of the zend apps
Signed-off-by: Martin Grenfell <[email protected]>
1 parent a7b595b commit e211519

10 files changed

+53
-0
lines changed

zend/assert.snippet

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$this->assertTrue(${1:somevar}, '${2:sometext}');

zend/boolcol.snippet

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$this->hasColumn('${1:active}', '${2:boolean}', ${3:1}, array('default' => '${4:1}','notnull' => true));

zend/flash.snippet

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$this->_flashMessenger->addMessage("${1}", '${2:error}');

zend/input.snippet

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?= $this->formInput(array( 'type' => '${1:hidden}',
2+
'name' => '${2}',
3+
'value' => ${3:},
4+
'id' => '${4:}' )); ?>

zend/inputarr.snippet

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?= $this->formInput(array( 'type' => '${1:dropdown}',
2+
'name' => '${2}',
3+
'label' => '${3:}',
4+
'errors' => ${4:},
5+
'value' => ${5:},
6+
'valueList' => ${6:} )); ?>

zend/intcol.snippet

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$this->hasColumn('${1:id}', '${2:integer}', ${3:11}, array(${4:'notnull' => true)});

zend/lib.snippet

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
class Application_${1:Hellu}
4+
{${2}
5+
}

zend/model.snippet

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
class ${1:Model} extends Doctrine_Record implements Zend_Auth_Adapter_Interface, Zend_Acl_Role_Interface
3+
{
4+
protected $searchconditions = array();
5+
6+
/**
7+
* Enter description here...
8+
*
9+
* @var ${2:Model}
10+
*/
11+
protected static $_identity = null;
12+
13+
/**
14+
* Zend_Auth
15+
*
16+
* @var Zend_Auth
17+
*/
18+
protected static $_auth;
19+
20+
21+
/**
22+
* Doctrine
23+
*/
24+
public function setTableDefinition()
25+
{
26+
$this->hasColumn('id', 'integer', 4, array('notnull' => true,
27+
'primary' => true,
28+
'autoincrement' => true));
29+
${3}
30+
}
31+
32+
}

zend/route.snippet

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$this->_redirector->gotoRoute(array('controller' => '${1}', 'action' => '${2:index}', 'id' => '${3:}'), '${4:admin_action}');

zend/strcol.snippet

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$this->hasColumn('${1:title}', '${2:string}', ${3:255}, array(${4:'notnull' => true}));

0 commit comments

Comments
 (0)