Index: branches/1.0.x/units/widgets/widget_tp.php =================================================================== diff -u -N -r12914 -r13008 --- branches/1.0.x/units/widgets/widget_tp.php (.../widget_tp.php) (revision 12914) +++ branches/1.0.x/units/widgets/widget_tp.php (.../widget_tp.php) (revision 13008) @@ -18,5 +18,30 @@ { return 'Hello world!'; } + + /** + * Returns a link for editing product + * + * @param Array $params + * @return string + */ + function ItemEditLink($params) + { + $object =& $this->getObject(); + /* @var $object kDBList */ + + $edit_template = $this->Application->getUnitOption($this->Prefix, 'AdminTemplatePath') . '/' . $this->Application->getUnitOption($this->Prefix, 'AdminTemplatePrefix') . 'edit'; + + $url_params = Array ( + 'm_opener' => 'd', + $this->Prefix.'_mode' => 't', + $this->Prefix.'_event' => 'OnEdit', + $this->Prefix.'_id' => $object->GetID(), + 'pass' => 'all,'.$this->Prefix, + 'no_pass_through' => 1, + ); + + return $this->Application->HREF($edit_template, '', $url_params); + } } \ No newline at end of file