Render an emptyl

@param null $remoteId
@return mixed
@throws \Exception
165964
static function renderRemoteEmptyModal($remoteId = null)
    {
        $modal = modal();

        if (!is_null($remoteId)) {
            $modal->setRemoteId($remoteId);
        }
        return $modal->getRenderer()->render('modal_remote', $modal);
    }
230782
private function execute($remote, $url)
    {
        /** @var ConfigurationDataResponse $configurationData */
        $configurationData = $this->queryBus->handle(new ConfigurationDataFinder());
        $prePushResponse = $configurationData->getPrePush();

        if (true === $prePushResponse->isPrePush()) {
            $this->output->writeln(self::PRE_PUSH_HOOK);
            $this->executeOriginalHook($remote, $url, $prePushResponse->getErrorMessage());

            $phpunitResponse = $prePushResponse->getPhpUnit();

            if (true === $phpunitResponse->isPhpunit()) {
                $this->commandBus->handle(
                    new PhpUnitTool(
                        $phpunitResponse->isPhpunitRandomMode(),
                        $phpunitResponse->getPhpunitOptions(),
                        $prePushResponse->getErrorMessage()
                    )
                );

                $phpunitStrictCoverageResponse = $prePushResponse->getPhpUnitStrictCoverage();

                if (true === $phpunitStrictCoverageResponse->isPhpunitStrictCoverage()) {
                    $this->commandBus->handle(
                        new StrictCoverage(
                            $phpunitStrictCoverageResponse->getMinimum(),
                            $prePushResponse->getErrorMessage()
                        )
                    );
                }

                $phpunitGuardCoverageResponse = $prePushResponse->getPhpUnitGuardCoverage();

                if (true === $phpunitGuardCoverageResponse->isEnabled()) {
                    $this->commandBus->handle(
                        new GuardCoverage($phpunitGuardCoverageResponse->getWarningMessage())
                    );
                }
            }

            $this->output->writeln(GoodJobLogoResponse::paint($prePushResponse->getRightMessage()));
        }
    }
326300
public function pullWithInfo($remote = null) {
		$result = $this->extractFromCommand("git pull $remote", 'trim');
		$result = implode(PHP_EOL, $result);
		$result = trim($result);
		return $result;
	}
463736
public static void render(String id) {
        if (id == null || id.isEmpty()) {
            throw new IllegalArgumentException("render() for empty id is not possible");
        }
        renderImpl(id);
    }
951761
public function detailsAction($id)
        {

            $aRemoteApps       = RemoteAppQuery::create()->findOneById($id);
            $aRemoteAppHistory = $aRemoteApps->getRemoteHistoryContaoAsArray();

            return $this->render('SlashworksAppBundle:RemoteApp:details.html.twig', array(
                'remoteapp'        => $aRemoteApps,
                'remoteappHistory' => $aRemoteAppHistory
            ));
        }
1045010
public function push($remote = 'origin')
    {
        if (!$this->hasCheckout) {
            throw new \RuntimeException('This operation requires an active checkout.');
        }

        try {
            return $this->execute('push', array('--porcelain' => true, $remote));
        } catch (\RuntimeException $e) {
            // ignore output on stderr: it contains
            // progress information, for example about hooks
        }

        return null;
    }
487850
public function __tearup($sessionId = null)
    {
        $configuration = self::getRegistry()->getConfiguration()->session;

        $this
            ->logger(self::getRegistry()->getLogging())
            ->id($sessionId)
            ->clientIp($_SERVER['REMOTE_ADDR'])
            ->userAgent($_SERVER['HTTP_USER_AGENT'])
            ->domain($_SERVER['SERVER_NAME'])
            ->flagStatus('httpOnly', true)
            ->flagStatus('ssl', true);

        if (true === $configuration->autoinit) {
            $this
                ->init($configuration)
                ->start();
        }
    }
778287
public function editAction($id)
        {

            /** @var RemoteApp $oRemoteApp */
            $oRemoteApp = RemoteAppQuery::create()->findOneById($id);

            if (count($oRemoteApp) === 0) {
                throw $this->createNotFoundException('Unable to find RemoteApp entity.');
            }

            $editForm   = $this->createEditForm($oRemoteApp);
            $deleteForm = $this->createDeleteForm($id);

            return $this->render('SlashworksAppBundle:RemoteApp:edit.html.twig', array(
                'entity'      => $oRemoteApp,
                'edit_form'   => $editForm->createView(),
                'delete_form' => $deleteForm->createView(),
            ));
        }
680392
public function runSingleApiCallAction($id)
        {


            $sLico = SystemSettings::get("lico");
            $iLvdc = SystemSettings::get("lvdc");

            if ($iLvdc < strtotime("-7 days")) {
                $aRemoteApps = RemoteAppQuery::create()->filterByWebsiteHash(null, \Criteria::ISNOTNULL);
                $lico        = $sLico . "/api/lvdc/" . base64_encode($this->_getSiteURL()) . "/" . $aRemoteApps->count();
                try {
                    $res = @file_get_contents($lico);
                    if ($res === false) {
                        throw new \Exception($this->get("translator")->trans("license.update.failed_lico"));
                    }
                    $oResult = json_decode($res);

                    if ($oResult->valid !== true) {
                        $aResponse = array(
                            "error"   => true,
                            "message" => $oResult->message
                        );
                    } else {
                        SystemSettings::set("lvdc", time());
                    }

                } catch (\Exception $e) {
                    $aResponse = array(
                        "error"   => true,
                        "message" => $e->getMessage()
                    );
                }
            }


            try {

                if (!isset($aResponse)) {
                    $command = new ApiCommand();
                    $command->setContainer($this->container);
                    $input  = new ArgvInput(array(
                                                'control:remote:cron',
                                                '--app=' . $id,
                                                '--force'
                                            ));


                    $output = new BufferedOutput();
                    // Run the command
                    $retval     = $command->run($input, $output);
                    $oRemoteApp = RemoteAppQuery::create()->findOneById($id);
                    $sJsonData  = $this->renderView('SlashworksAppBundle:RemoteApp:data.json.twig', array('entities' => array($oRemoteApp)));
                    $aData      = json_decode($sJsonData, true);

                    $sReturn = $output->fetch();
                    $aReturn = json_decode($sReturn, true);

                    if($aReturn !== false){
                        if(is_array($aReturn)){
                            if($aReturn['status'] === false) {
                                $this->get('logger')->error($aReturn['message'], array("Method" => __METHOD__, "RemoteApp" => $oRemoteApp->getName(), "RemoteURL" => $oRemoteApp->getFullApiUrl()));
                                $aResponse = $aReturn;
                            }elseif($aReturn['status'] === true) {
                                $this->get('logger')->info("Api-Call successful", array("Method" => __METHOD__, "RemoteApp" => $oRemoteApp->getName()));
                                $aResponse = $aData;
                            } else {
                                $this->get('logger')->error("Unknown error in ".__FILE__." on line ".__LINE__, array("Method" => __METHOD__, "RemoteApp" => $oRemoteApp->getName(), "RemoteURL" => $oRemoteApp->getFullApiUrl()));
                                $aResponse = array("error" => true);
                            }
                        }
                    }else {

                        if (!$retval) {
                            $this->get('logger')->info("Api-Call successful", array("Method" => __METHOD__, "RemoteApp" => $oRemoteApp->getName()));
                            $aResponse = $aData;
                        } else {
                            $this->get('logger')->error("Unknown error in ".__FILE__." on line ".__LINE__, array("Method" => __METHOD__, "RemoteApp" => $oRemoteApp->getName(), "RemoteURL" => $oRemoteApp->getFullApiUrl()));
                            $aResponse = array("error" => true);
                        }
                    }
                }
            } catch (\Exception $e) {
                $this->get('logger')->error($e->getMessage());
                $aResponse = array(
                    "error"   => true,
                    "message" => $e->getMessage()
                );
            }

            $response = new Response(json_encode($aResponse));
            $response->headers->set('Content-Type', 'application/json');

            return $response;
        }
27314
public function setRemoteVersionUrl(string $remoteVerUrl): void
    {
        if (empty($remoteVerUrl)) {
            throw new Exception('the parameter $remoteVerUrl can not be empty', Exception::VERSION_URL_MISSING);
        }

        $this->remoteVersionUrl = $remoteVerUrl;
    }
107092
public function cancelContentId($contentId)
    {
        $params = array();
        $params['action'] = 'cancleContentIdAction';
        $params['appkey'] = $this->appkey;
        $params['contentId'] = $contentId;
        $rep = $this->httpPostJSON($this->host, $params);
        return (string)$rep['result'] === 'ok';
    }
200086
public function show($resourceId, $childResouceId)
    {
        $parameters = $this->request->getParameters();
        $model = $this->repository
        ->setResource($resourceId)
        ->setRelation($this->relation())
        ->getItem($childResouceId, $parameters);
        return $this->modelResponse($model);
    }
1256663
public function getBasicTagDataByRemoteId($remoteId)
    {
        try {
            return $this->innerGateway->getBasicTagDataByRemoteId($remoteId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
1003944
function _draw_remote_id(id_string){
	function _process_resp(resp){
	    var doc = resp.get_doc(0);
	    _draw_local_doc(doc);
	}
	anchor.register('search', 'do', _process_resp);
	anchor.set_id(id_string);
	//ll('FOO: ' + id_string);
	anchor.search();
    }
610905
public function pull($remote = null, $branch = null)
    {
        $result = $this->command . ' pull ' . $remote . ' ' . $branch;
        return $result;
    }
7082
public static function renderUri( $uri, $options = array() )
    {
        $serviceContainer = ezpKernel::instance()->getServiceContainer();
        $fragmentHandler = $serviceContainer->get( 'fragment.handler' );

        $strategy = isset( $options['strategy'] ) ? $options['strategy'] : 'inline';
        unset( $options['strategy'] );

        try
        {
            return $fragmentHandler->render( $uri, $strategy, $options );
        }
        catch ( InvalidArgumentException $e )
        {
            throw new InvalidArgumentException( "The URI {$uri->controller} couldn't be rendered", 0, $e );
        }
    }
1200243
public function get($agentId)
    {
        $menus = $this->http->get(self::API_GET.'?agentid='.$agentId);

        return empty($menus['menu']['button']) ? array() : $menus['menu']['button'];
    }