This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

[swToolboxPlugin] remove form widgets / validator / formatter + relat…

…ed javascript (now part of swFormExtraPlugin)

git-svn-id: http://svn.symfony-project.com/plugins/swToolboxPlugin/sf1.2/trunk@21553 ee427ae8-e902-0410-961c-c3ed070cd9f9
  • Loading branch information...
rande committed Aug 30, 2009
1 parent 1abf8b9 commit 6cedf4a2bd1e5a31a8762576cbb95d06290db17a
@@ -27,11 +27,13 @@
* @author Thomas Rabaix <thomas.rabaix@soleoweb.com> * @author Thomas Rabaix <thomas.rabaix@soleoweb.com>
* @version SVN: $Id$ * @version SVN: $Id$
*/ */
abstract class baseswBreadcrumb { abstract class baseswBreadcrumb
{
private static $entry = array(); private static $entry = array();
public static function add($breadcrumb = null, $url = null, $title = null, $image = null) { public static function add($breadcrumb = null, $url = null, $title = null, $image = null)
{
self::$entry[] = array( self::$entry[] = array(
'breadcrumb' => $breadcrumb, 'breadcrumb' => $breadcrumb,
'url' => $url, 'url' => $url,
@@ -40,15 +42,21 @@ public static function add($breadcrumb = null, $url = null, $title = null, $imag
); );
} }
public static function get() { public static function get()
{
return self::$entry; return self::$entry;
} }
public static function reset(){ public static function reset()
{
self::$entry = array(); self::$entry = array();
} }
public static function clean(){ public static function clean()
{
self::reset(); self::reset();
} }
@@ -29,7 +29,7 @@
* @author Thomas Rabaix <thomas.rabaix@soleoweb.com> * @author Thomas Rabaix <thomas.rabaix@soleoweb.com>
* @version SVN: $Id$ * @version SVN: $Id$
*/ */
class swToolboxFormHelper class swToolboxFormDynamicHelper
{ {
/** /**
* Helper method to be call inside a form. This is part of the "Dynamic Form Values" form feature * Helper method to be call inside a form. This is part of the "Dynamic Form Values" form feature
View
@@ -63,7 +63,7 @@ static public function buildUrl($text)
static function updateFormElements(sfForm $form, sfWidget $widget, array $elements) static function updateFormElements(sfForm $form, sfWidget $widget, array $elements)
{ {
throw new RuntimeException('Please update the '.get_class($form).' sfForm class. This method is now deprecated, use swToolboxFormHelper::updateFormElement'); throw new RuntimeException('Please update the '.get_class($form).' sfForm class. This method is now deprecated, use swFormHelper::updateFormElement (swFormExtraPlugin)');
} }
/** /**
@@ -72,6 +72,6 @@ static function updateFormElements(sfForm $form, sfWidget $widget, array $elemen
static function convertFileInformation($taintedFiles) static function convertFileInformation($taintedFiles)
{ {
return swToolboxFormHelper::convertFileInformation($taintedFiles); throw new RuntimeException('Please update the '.get_class($form).' sfForm class. This method is now deprecated, use swFormHelper::convertFileInformation (swFormExtraPlugin)');
} }
} }
@@ -74,7 +74,7 @@ public function executeRetrieveDynamicValues($request)
} }
if(($param = swToolboxFormHelper::getBindParameter($form->getWidgetSchema()->getNameFormat())) !== null) if(($param = swToolboxFormDynamicHelper::getBindParameter($form->getWidgetSchema()->getNameFormat())) !== null)
{ {
$values = $request->getParameter($param); $values = $request->getParameter($param);
} }
@@ -92,7 +92,7 @@ public function executeRetrieveDynamicValues($request)
return sfView::NONE; return sfView::NONE;
} }
$info = swToolboxFormHelper::getWidgetSchemaFromName($form, $name); $info = swToolboxFormDynamicHelper::getWidgetSchemaFromName($form, $name);
if(!$info['widgetSchema']) if(!$info['widgetSchema'])
{ {
@@ -102,7 +102,7 @@ public function executeRetrieveDynamicValues($request)
$values = $form->getDynamicValues($info['widgetSchema'], $info['field']); $values = $form->getDynamicValues($info['widgetSchema'], $info['field']);
$json_values = swToolboxFormHelper::generateValuesById($form->getWidgetSchema(), $values); $json_values = swToolboxFormDynamicHelper::generateValuesById($form->getWidgetSchema(), $values);
echo json_encode($json_values); echo json_encode($json_values);
View

This file was deleted.

Oops, something went wrong.

0 comments on commit 6cedf4a

Please sign in to comment.