Skip to content

Instantly share code, notes, and snippets.

View slave2zeros's full-sized avatar

Ryan Gallagher slave2zeros

View GitHub Profile
<script type="text/javascript">
{% spaceless %}
{% set routeParams = {} %}
{% for k in app.request.attributes.all|keys %}
{% if k|first != '_' %}
{% set routeParams = routeParams|merge({(k): app.request.attributes.all[k]}) %}
{% endif %}
{% endfor %}
<?php
namespace Eduguide\CheersBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class CheerGiftFormType extends AbstractType
{
private $giftChoices;
mysql> select * from tours;
+----+------------------+-------------+------------------+---------------------+
| id | tour_name | eg_env | kera_tutorial_id | created_at |
+----+------------------+-------------+------------------+---------------------+
| 2 | Team site signup | development | 650a40430f | 2012-11-26 17:01:39 |
| 3 | Team site signup | staging | b283456766 | 2012-11-26 17:01:39 |
| 4 | Team site signup | production | 94af058d3a | 2012-11-26 17:01:39 |
+----+------------------+-------------+------------------+---------------------+
3 rows in set (0.00 sec)
<?php
/**
* Add tours_users table to track user progress on various kera tours
*
* @author rgallagher
* @version 1.0
*
*/
class Add_tours_users_table
{
- if($x == 1)
.someClassDiv= $someVarToShow
public function deleteStepUser($outputFormat=null)
{
$this->before($outputFormat);
$data = $this->convertInput($this->getDataSource());
$this->checkData($data);
$this->checkStep($data);
$this->checkUser($data);
$goalStepUser = GoalStepUser::findByDql('step_id = ? AND user_id = ? AND team_id IS NULL', array($data['GoalStep']['id'], $data['User']['id']))->getFirst();
if ($response['status'] == 200) {
$pathInstanceId = $response['data']['PathInstance']['id'];
$this->_dataSource['PathInstance']['id'] = $pathInstanceId; // Needed for later saves.
if (array_key_exists('PathInstanceGoal', $_POST) && count($_POST['PathInstanceGoal']) > 0) {
$response = unserialize($this->apiCall(false, false, true, 'api/paths_api/addPathInstanceGoals', 'serialized'));
if($response['status'] == 200) { <--- Added this condition
if(array_key_exists('recipients', $_POST)) {
foreach ($_POST['recipients'] as $r) {
Array
(
[PathInstanceGoal] =&gt; Array
(
[id] =&gt; 141
[path_instance_id] =&gt; 104
[goal_id] =&gt; 1328
[start_date] =&gt; 2012-07-16 00:00:00
[due_date] =&gt;
[status_id] =&gt; 1
Array
(
[PathInstanceGoal] => Array
(
[id] => 141
[path_instance_id] => 104
[goal_id] => 1328
[start_date] => 2012-07-16 00:00:00
[due_date] =>
[status_id] => 1
Fatal error: Uncaught exception 'Doctrine_Record_Exception' with message 'Couldn't call Doctrine_Core::set(), second argument should be an instance of Doctrine_Collection when setting one-to-many references.' in /Users/ryangallagher/Sites/eduguide/system/application/helpers/doctrine/Doctrine/Record.php on line 1582
( ! ) Doctrine_Record_Exception: Couldn't call Doctrine_Core::set(), second argument should be an instance of Doctrine_Collection when setting one-to-many references. in /Users/ryangallagher/Sites/eduguide/system/application/helpers/doctrine/Doctrine/Record.php on line 1582
Call Stack
# Time Memory Function Location
1 0.0002 683968 {main}( ) ../index.php:0
2 0.0007 776136 require_once( '/Users/ryangallagher/Sites/eduguide/system/core/CodeIgniter.php' ) ../index.php:201
3 0.1666 18101680 call_user_func_array ( ) ../CodeIgniter.php:339
4 0.1666 18101816 Paths->details( ) ../CodeIgniter.php:339
5 0.4102 24750584 MX_Loader->view( ) ../paths.php:66
6 0.4103 24753432 MX_Loader->_ci_load( ) ../Loader.php: