]> git.andy128k.dev Git - ipf.git/commitdiff
cleanup
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 24 Aug 2014 11:27:55 +0000 (14:27 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 24 Aug 2014 11:27:55 +0000 (14:27 +0300)
ipf/form.php
ipf/legacy_orm/orm/record.php
ipf/router.php
ipf/shortcuts.php

index fed4367f2b51e43ad48a67439dd105b5a16d2c39..a071f386757f2add30de991eaccb6acb282afb7f 100644 (file)
@@ -21,14 +21,12 @@ abstract class IPF_Form implements Iterator
 
     protected $is_valid = null;
 
-    function __construct($data=null, $extra=array(), $label_suffix=null)
+    function __construct($data=null, $extra=array())
     {
         if ($data !== null) {
             $this->data = $data;
             $this->is_bound = true;
         }
-        if ($label_suffix !== null) $this->label_suffix = $label_suffix;
-
         $this->initial = \PFF\Arr::get($extra, 'initial', array());
         $this->initFields($extra);
         $this->f = new IPF_Form_FieldProxy($this);
index 2b5b908bdae4cc70979f232d369bb42558f286db..8be51ab10276b87a4643bf63bc09c2af047ed134 100644 (file)
@@ -1178,14 +1178,6 @@ abstract class IPF_ORM_Record extends IPF_ORM_Record_Abstract implements Countab
         return sprintf('<%s #%d>', get_class($this), $this->_oid);
     }
 
-    public function ModelAdmin()
-    {
-        $cn = get_class($this);
-        if (isset(IPF_Admin_Model::$models[$cn]))
-            return IPF_Admin_Model::$models[$cn];
-        return null;
-    }
-
     public function SetFromFormData($cleaned_values)
     {
         $names = $this->_table->getFieldNames();
index 9c80df7349a876ac3ea737a51996d3911eefbfaf..91dc75f97feb1c222a4c62a0dc486ca7d641f515 100644 (file)
@@ -71,7 +71,7 @@ class IPF_Router
             $response = self::response500($req, $e);
             $response->render();
         }
-   }
+    }
 
     public function match($req)
     {
index 62a25f4d3fc377da4adb794313f64564f1a467cc..f3609ad8932136a02cc698a3244efcb13b1a2331 100644 (file)
@@ -21,11 +21,5 @@ final class IPF_Shortcuts
         $tmpl = new IPF_Template_File($tplfile, IPF_Project_Template::getDefaultTemplateEnvironment());
         return $tmpl->render($context);
     }
-
-    public static function GetFormForModel($model, $data=null, $extra=array(), $label_suffix=null)
-    {
-        $extra['model'] = $model;
-        return new IPF_Form_Model($data, $extra, $label_suffix);
-    }
 }