if ($column->isPrimaryKey()) { continue; } $credentials = $this->getParameterValue('edit.fields.' . $column->getName() . '.credentials'); $input_type = $this->getParameterValue('edit.fields.' . $column->getName() . '.type'); $user_params = $this->getParameterValue('edit.fields.' . $column->getName() . '.params'); $user_params = is_array($user_params) ? $user_params : sfToolkit::stringToArray($user_params); $through_class = isset($user_params['through_class']) ? $user_params['through_class'] : ''; if ($through_class) { $class = $this->getClassName(); $related_class = sfPropelManyToMany::getRelatedClass($class, $through_class); $related_table = constant($related_class . 'Peer::TABLE_NAME'); $middle_table = constant($through_class . 'Peer::TABLE_NAME'); $this_table = constant($class . 'Peer::TABLE_NAME'); $related_column = sfPropelManyToMany::getRelatedColumn($class, $through_class); $column = sfPropelManyToMany::getColumn($class, $through_class); if ($input_type == 'admin_double_list' || $input_type == 'admin_check_list' || $input_type == 'admin_select_list') { if ($credentials) { $credentials = str_replace("\n", ' ', var_export($credentials, true)); ?> if ($this->getUser()->hasCredential(<?php echo $credentials; ?> )) { <?php } ?> // Update many-to-many for "<?php echo $name; ?>
continue; } $credentials = $this->getParameterValue('edit.fields.' . $column->getName() . '.credentials'); $input_type = $this->getParameterValue('edit.fields.' . $column->getName() . '.type'); $user_params = $this->getParameterValue('edit.fields.' . $column->getName() . '.params'); $user_params = is_array($user_params) ? $user_params : sfToolkit::stringToArray($user_params); $through_class = isset($user_params['through_class']) ? $user_params['through_class'] : ''; $remote_column = isset($user_params['related_column']) ? $user_params['related_column'] : ''; if ($through_class) { $class = $this->getClassName(); $related_class = sfPropelManyToMany::getRelatedClass($class, $through_class, $remote_column); $related_table = constant(constant($related_class . '::PEER') . '::TABLE_NAME'); $middle_table = constant(constant($through_class . '::PEER') . '::TABLE_NAME'); $this_table = constant(constant($class . '::PEER') . '::TABLE_NAME'); $related_column = sfPropelManyToMany::getRelatedColumn($class, $through_class, $remote_column); $column = sfPropelManyToMany::getColumn($class, $through_class, $remote_column); if ($input_type == 'admin_double_list' || $input_type == 'admin_check_list' || $input_type == 'admin_select_list') { if ($credentials) { $credentials = str_replace("\n", ' ', var_export($credentials, true)); ?> if ($this->getUser()->hasCredential(<?php echo $credentials; ?> )) { <?php } ?> // Update many-to-many for "<?php echo $name; ?>