Skip to content

Instantly share code, notes, and snippets.

View radutopala's full-sized avatar
🦅
Building in Go @trisoftro #golang

Radu Topala radutopala

🦅
Building in Go @trisoftro #golang
View GitHub Profile
@radutopala
radutopala / MyModelPeer.php
Created September 18, 2012 10:21
Tree Widget example
<?php
class MyModelPeer extends BaseMyModelPeer {
public static function getStats($id)
{
//use $id for something
$stats['company1']['product1'] = array('items'=>5, 'price'=>5*10);
$stats['company1']['product2'] = array('items'=>9, 'price'=>9*2);
@radutopala
radutopala / User.php
Created September 9, 2012 17:37
User class
<?php
/*
* @author Radu Topala <[email protected]>
*/
class User
{
protected $id;
@radutopala
radutopala / skillEditNotOpenAction.class.php
Created July 17, 2012 09:29
Example of closing or opening popup after submit
<?php
// not opening the popup again after submitting
class skillEditAction extends simpleWidgetEditAction
{
public function execute($request)
{
if ($request->isMethod('post')) {
if ($this->processPostData()) {
$result = array(
@radutopala
radutopala / delete.class.php
Created May 29, 2012 08:28
Delete row action
<?php
class deleteAction extends sfAction
{
public function execute($request)
{
if ($request->isMethod('post')) {
$fhr = MyModelQuery::create()->findPk($this->getRequestParameter('id'));