render unlink action for a widgetId.

@param int $widgetId The widgetId to unlink

@return string the widget unlink action
189379
public function cmsWidgetUnlinkAction($widgetId, $view)
    {
        $viewReference = $this->viewReferenceRepository->getOneReferenceByParameters(
            ['viewId' => $view->getId()]
        );
        if (!$viewReference && $view->getId() != '') {
            $viewReference = new ViewReference($view->getId());
        } elseif ($view instanceof VirtualBusinessPage) {
            $viewReference = new ViewReference($view->getTemplate()->getId());
        }

        $view->setReference($viewReference);

        return $this->widgetRenderer->renderUnlinkActionByWidgetId($widgetId, $view);
    }
1314288
public function getWidgetMapByWidgetId($widgetId)
    {
        $widgetMap = null;

        $widgetMaps = $this->widgetMaps;

        //parse the widgets maps
        foreach ($widgetMaps as $wm) {
            if ($wm->getWidgetId() === $widgetId) {
                $widgetMap = $wm;
                //entity found, there is no need to continue
                break;
            }
        }

        return $widgetMap;
    }
760412
public function unassignDisplay($displayId)
    {
        $this->getLogger()->info('Unassigning display ID ' . json_encode($displayId) . ' From display Group ID ' . $this->displayGroupId);
        $this->doPost('/displaygroup/' . $this->displayGroupId . '/display/unassign', [
            'displayId' => $displayId
            ]);

        return $this;
    }
58749
public function my_removeUid($uid)
    {
        if (get_instance()->isCluster()) {
            $this->map[$this->node_name]->remove($uid);
            foreach ($this->client as $client) {
                $client->removeNodeUid($this->node_name, $uid);
            }
            if (Start::isLeader()) {
                get_instance()->pub('$SYS/uidcount', $this->countOnline());
            }
        }
        $this->my_clearUidSub($uid);
    }
1108548
public function unregister($id)
    {
        if (array_key_exists($id, $this->components)) {
            unset($this->components[$id]);
        }

        if (array_key_exists($id, $this->instances)) {
            unset($this->instances[$id]);
        }

        return $this;
    }
1202136
public function unlink($uri)
    {
        $this->uri = $uri;

        return $this->invoke($this->getFilesystem(), 'delete', [$this->getTarget()], 'unlink');
    }
8343
public function delete($id)
    {
        if ($id instanceof DocumentInterface) {
            $id = $id->getId();
        }

        $path = $this->getPathForDocument($id);

        return unlink($path);
    }
1363477
public function deleteAction(Request $request, User $loggedUser, $type, $widgetId)
    {
        $this->checkPortfolioToolAccess($loggedUser);

        /** @var \Icap\PortfolioBundle\Repository\Widget\AbstractWidgetRepository $abstractWidgetRepository */
        $abstractWidgetRepository = $this->getDoctrine()->getRepository('IcapPortfolioBundle:Widget\AbstractWidget');

        /** @var \Icap\PortfolioBundle\Entity\Widget\AbstractWidget $widget */
        $widget = $abstractWidgetRepository->findOneByWidgetType($type, $widgetId, $loggedUser);

        $response = new JsonResponse();

        try {
            $this->getWidgetsManager()->deleteDataWidget($widget);
        } catch (\Exception $exception) {
            $response->setStatusCode(Response::HTTP_INTERNAL_SERVER_ERROR);
        }

        return $response;
    }
122752
public function widgetId()
    {
        if (!$this->widgetId) {
            $type = $this->type();
            switch ($type) {
                case static::PROPERTY_DISPLAY:
                    $id = $this->display()->displayId();
                    break;

                case static::PROPERTY_CONTROL:
                    $id = $this->input()->inputId();
                    break;

                default:
                    $id = 'widget_'.uniqid();
                    break;
            }

            $this->widgetId = $id;
        }

        return $this->widgetId;
    }
74674
public function deleteAction()
    {
        $server = (new \Cms\Orm\CmsCategoryWidgetQuery)->findPk($this->id);
        if ($server && $server->delete()) {
            $this->getMessenger()->addMessage('messenger.categoryWidget.widgetConfig.deleted');
        }
        $this->getResponse()->redirect('cmsAdmin', 'categoryWidget');
    }
1032818
public function ungroup($id)
    {
        $params = [
            'plp_id'  => $id,
        ];

        /** @var \SkyHub\Api\Handler\Response\HandlerInterface $responseHandler */
        $responseHandler = $this->service()->delete($this->baseUrlPath(), $params);
        return $responseHandler;
    }
488484
public function renderWidgetContainer()
    {
        Piwik::checkUserHasSomeViewAccess();
        $this->checkSitePermission();

        $view = new View('@CoreHome/widgetContainer');
        $view->isWidgetized = (bool) Common::getRequestVar('widget', 0, 'int');
        $view->containerId  = Common::getRequestVar('containerId', null, 'string');

        return $view->render();
    }
907016
public function removeById($id)
    {
        if (isset($this->ids[$id])) {
            foreach ($this->ids[$id] as $alias) {
                unset($this->aliases[$alias]);
            }
            unset($this->ids[$id]);
        }

        return $this;
    }
318786
public function prepareAsynchronousRender($widgetId)
    {
        $ngControllerName = 'widget'.$widgetId.'AsynchronousLoadCtrl';
        $ngDirectives = sprintf('ng-controller="WidgetAsynchronousLoadController as %s" class="vic-widget" ng-init="%s.init(%d)" ng-bind-html="html"', $ngControllerName, $ngControllerName, $widgetId);
        $html = sprintf('<div class="vic-widget-container vic-widget-asynchronous" data-id="%d" %s></div>', $widgetId, $ngDirectives);

        return $html;
    }
75016
public function remove($id)
    {
        $item = $this->getOrFail($id);
        unset($this->items[$id]);
        return $item;
    }
573537
public function unBindUid($uid, $fd)
    {
        //更新共享内存
        $in_table_uid = $this->uid_fd_table->get($uid);
        $in_table_fd = $this->fd_uid_table->get($fd);
        //判断共享内存中存储的uid与fd配对是否为当前要删除的配对，如果确认是，再进行删除
        if (!empty($in_table_uid) && $in_table_uid['fd'] == $fd) {
            $this->uid_fd_table->del($uid);
        }

        if (!empty($in_table_fd) && $in_table_fd['uid'] == $uid) {
            echo "\n 【当前共享内存中存储的fd与uid配对成功，进行删除】";
            $this->fd_uid_table->del($fd);
        }
        //这里无论是不是集群都需要调用
        ProcessManager::getInstance()->getRpcCall(ClusterProcess::class, true)->my_removeUid($uid);
        if (!$this->isCluster()) {
            get_instance()->pub('$SYS/uidcount', $this->uid_fd_table->count());
        }
    }
1189051
public function remove($itemId)
    {
        $items = &$this->items;

        foreach ($items as $position => $item) {
            if ($itemId === $item->id) {
                unset($items[$position]);
            }
        }
    }