Skip to content
This repository has been archived by the owner on Mar 10, 2018. It is now read-only.

Commit

Permalink
[swToolboxPlugin] remove form widgets / validator / formatter + relat…
Browse files Browse the repository at this point in the history
…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 6cedf4a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 281 deletions.
18 changes: 13 additions & 5 deletions lib/base/baseswBreadcrumb.class.php
Expand Up @@ -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,
Expand All @@ -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();
} }


Expand Down
2 changes: 1 addition & 1 deletion lib/form/swToolboxFormDynamicHelper.class.php
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/swToolbox.class.php
Expand Up @@ -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)');
} }


/** /**
Expand All @@ -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)');
} }
} }
6 changes: 3 additions & 3 deletions modules/swToolbox/lib/baseSwToolboxActions.class.php
Expand Up @@ -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);
} }
Expand All @@ -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'])
{ {
Expand All @@ -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);


Expand Down
270 changes: 0 additions & 270 deletions test/unit/swFormTest.php

This file was deleted.

0 comments on commit 6cedf4a

Please sign in to comment.