Code Duplication    Length = 12-12 lines in 2 locations

class/ObjectController.php 2 locations

@@ 467-478 (lines=12) @@
464
     * @param  bool   $userSide
465
     * @return string
466
     */
467
    public function getEditItemLink($smartObj, $onlyUrl = false, $withimage = true, $userSide = false)
468
    {
469
        $admin_side = $userSide ? '' : 'admin/';
470
        $ret        = $this->handler->_moduleUrl . $admin_side . $this->handler->_page . '?op=mod&' . $this->handler->keyName . '=' . $smartObj->getVar($this->handler->keyName);
471
        if ($onlyUrl) {
472
            return $ret;
473
        } elseif ($withimage) {
474
            return "<a href='" . $ret . "'><img src='" . SMARTOBJECT_IMAGES_ACTIONS_URL . "edit.png' style='vertical-align: middle;' alt='" . _CO_SOBJECT_MODIFY . "'  title='" . _CO_SOBJECT_MODIFY . "'></a>";
475
        }
476
477
        return "<a href='" . $ret . "'>" . $smartObj->getVar($this->handler->identifierName) . '</a>';
478
    }
479
480
    /**
481
     * @param         $smartObj
@@ 487-498 (lines=12) @@
484
     * @param  bool   $userSide
485
     * @return string
486
     */
487
    public function getDeleteItemLink($smartObj, $onlyUrl = false, $withimage = true, $userSide = false)
488
    {
489
        $admin_side = $userSide ? '' : 'admin/';
490
        $ret        = $this->handler->_moduleUrl . $admin_side . $this->handler->_page . '?op=del&' . $this->handler->keyName . '=' . $smartObj->getVar($this->handler->keyName);
491
        if ($onlyUrl) {
492
            return $ret;
493
        } elseif ($withimage) {
494
            return "<a href='" . $ret . "'><img src='" . SMARTOBJECT_IMAGES_ACTIONS_URL . "editdelete.png' style='vertical-align: middle;' alt='" . _CO_SOBJECT_DELETE . "'  title='" . _CO_SOBJECT_DELETE . "'></a>";
495
        }
496
497
        return "<a href='" . $ret . "'>" . $smartObj->getVar($this->handler->identifierName) . '</a>';
498
    }
499
500
    /**
501
     * @param $smartObj