Table View Generator

@param mixed $id
@param mixed $current
@param array $languages
@param array $list
@return \Illuminate\View\View
515720
public function table($id, $current, $languages, array $list)
    {
        app('antares.asset')->container('antares/foundation::application')->add('webpack_brand_settings', '/webpack/view_brand_settings.js', ['app_cache'])
                ->add('webpack_forms_advanced', '/webpack/forms_advanced.js', ['webpack_brand_settings'])
                ->add('translations_requirements', '/webpack/translations_requirements.js', ['webpack_forms_advanced']);
        publish('translations', ['js/translations.js']);
        return $this->translations->render('antares/translations::admin.translation.index', compact('dataTable', 'languages', 'current', 'list', 'id'));
    }
260699
public function generateObject($current)
	{
		if ($this->_caption != "")
		{
			$text = new XmlnukeText($this->_caption, true);
			$text->generateObject($current);
		}
		if ($this->_type == XmlListType::UnorderedList)
		{
			$node = XmlUtil::CreateChild($current, "ul", "");
		}
		elseif ($this->_type == XmlListType::OrderedList)
		{
			$node = XmlUtil::CreateChild($current, "ol", "");
		}
		if ($this->_name != "")
		{
			XmlUtil::AddAttribute($node, "name", $this->_name);
		}
		$this->generatePage($node);
	}
907562
public function actionEditLanguage($id = null, $contextId = null)
    {
        if ($id === null) {
            $model = new Language();
        } else {
            $model = $this->findLanguageModel($id);
        }
        if ($contextId !== null) {
            $model->context_id = $contextId;
        }
        $hasAccess = ($model->isNewRecord && Yii::$app->user->can('multilingual-create-language'))
            || (!$model->isNewRecord && Yii::$app->user->can('multilingual-edit-language'));
        $isLoaded = $model->load(Yii::$app->request->post());
        if ($isLoaded && !$hasAccess) {
            throw new ForbiddenHttpException;
        }
        if ($isLoaded && $model->save()) {
            return $this->redirect(['edit-language', 'id' => $model->id]);
        } else {
            return $this->render(
                'edit-language',
                [
                    'hasAccess' => $hasAccess,
                    'model' => $model,
                ]
            );
        }
    }
721417
public function show($id)
    {
        $flipbook = DB::table('flipbook')->where('id', $id)->get()[0];
       //dd($flipbook);
        $content = explode(",",$flipbook->content);
        return view('flipbook::showbook',compact('flipbook','content'));
    }
859867
public static function create($collection, $id = null, $database = null)
    {
        if ($collection instanceof \Phalcon\Mvc\Collection) {
            $id = $collection->getId();
            $collection = $collection->getSource();
        }
        if ($id instanceof \Phalcon\Mvc\Collection) {
            $id = $id->getId();
        }
        if (!$id instanceof \MongoId && $id !== null) {
            $id = new \MongoId($id);
        }

        return parent::create($collection, $id, $database);
    }
1177191
public function index($id)
    {
        $this->authorize('readList', File::class);
        $input  = $this->validator->validate('list');
        $params = $this->processor->process($input)->getProcessedFields();
        $file   = $this->repository->getById($id);
        if (!empty($file)) {
            $results = $this->repository->getTranslations(
                $file,
                $params['filter'],
                $params['orderBy'],
                $params['page'],
                $params['perPage']
            );
            return $this->respondWithSuccess($results, new FileTranslationTransformer);
        } else {
            return $this->respondNotFound();
        }
    }
56626
public function actionView($id)
    {
        $model = $this->findModel($id);
        $modelsI18n = $model::prepareI18nModels($model);

        if ($model->pageSize > 0) {
            $model->orderBy = $model->defaultOrderBy;
            $model->page = $model->calcPage();//echo __METHOD__.": calcPage(id={$id},pageSize={$model->pageSize})={$model->page}<br>";exit;
        }

        return $this->render('view', [
            'model' => $model,
            'modelsI18n' => $modelsI18n,
        ]);
    }
832682
public function generateObject($current)
	{
		$nodeCalendarEvent = XmlUtil::CreateChild($current, "event", $this->_text);
		
		XmlUtil::AddAttribute($nodeCalendarEvent, "day", $this->_day);
		if ($this->_type > 0)
		{
			XmlUtil::AddAttribute($nodeCalendarEvent, "type", ($this->_type-1) % 24 + 1);
		}
		
		$this->generatePage($nodeCalendarEvent);
	}
771513
public function findRenderList( $id = null )
    {
        $platform = $this->getDbAdapter()
                         ->getPlatform();

        $columns = $this->getSelectColumns();
        $columns['_depth'] = new Sql\Expression( '(' .
            $this->sql( null )
                 ->select( array( 'parent' => static::$tableName ) )
                 ->columns( array(
                     new Sql\Expression( 'COUNT(*)' )
                 ) )
                 ->where( array(
                     new Sql\Predicate\Expression(
                         $platform->quoteIdentifierChain( array( static::$tableName, 'left' ) ) .
                         ' BETWEEN ' . $platform->quoteIdentifierChain( array( 'parent', 'left' ) ) .
                             ' AND ' . $platform->quoteIdentifierChain( array( 'parent', 'right' ) )
                     ),
                 ) )
                 ->getSqlString( $platform ) .
        ')' );

        $select = $this->select( $columns )
                       ->order( 'left' );

        if ( null !== $id )
        {
            $select->join( array( 'parent' => self::$tableName ),
                           '( ' . self::$tableName . '.left BETWEEN parent.left AND parent.right ) ',
                           array() )
                   ->where( array( 'parent.id' => $id ) );
        }

        /* @var $result \Zend\Db\Adapter\Driver\ResultInterface */

        $return = array();
        $result = $this->sql()
                       ->prepareStatementForSqlObject( $select )
                       ->execute();

        foreach ( $result as $row )
        {
            $depth = (int) $row['_depth'];
            unset( $row['_depth'] );
            $return[] = array( $depth, $this->selected( $row ) );
        }

        return $return;
    }
702846
public function listToIn(array $list, &$params, $currentParamCount) {
        $criteria = $this->query();
        $criteriaHelper = new CriteriaHelper($criteria);
        return $criteriaHelper->listToIn($list, $params, $currentParamCount);
    }
442265
function table( $name, $id = null ) {

        // ignore List suffix
        $name = preg_replace( '/List$/', '', $name );

        if ( $id !== null ) {

            $result = $this->createResult( $this, $name );

            if ( !is_array( $id ) ) {

                $table = $this->getAlias( $name );
                $primary = $this->getPrimary( $table );
                $id = array( $primary => $id );

            }

            return $result->where( $id )->fetch();

        }

        return $this->createResult( $this, $name );

    }
421924
public function actionView($id)
	{
		//get the model, to use it within the meta tags
		$model = $this->findModel($id);
		//setting the meta keywords for this page
		$tok = new ClassifierBasedTokenizer(
	    new EndOfSentence(),
	    new WhitespaceTokenizer()
		);
		$text = strip_tags($model->content);
		$sentences = $tok->tokenize($text);
		if(is_array($sentences) && array_key_exists(0, $sentences))
		{			
			$this->view->registerMetaTag(
	            [
	                'name'    => 'metadescription',
	                'content' => $model->title . ' ' . substr($sentences[0],0,100)
	            ],
	            'keywords'
	        );
		}
		else{
			$this->view->registerMetaTag(
	            [
	                'name'    => 'metadescription',
	                'content' => $model->title . ' ' . $text
	            ],
	            'keywords'
	        );
		}

		$this->view->registerMetaTag(
            [
                'name'    => 'metakeywords',
                'content' => $model->tags
            ],
            'keywords'
        );

		return $this->render('onlineview', [
			'model' => $model,
		]);
	}
1005467
public function getList(PageInterface $current = null, $level = 0, $rawRoutes = false, $showAll = true, $showFullpath = false, $showSlug = false, $showModular = false, $limitLevels = false)
    {
        if (!$current) {
            if ($level) {
                throw new \RuntimeException('Internal error');
            }

            $current = $this->root();
        }

        $list = [];

        if (!$current->root()) {
            if ($rawRoutes) {
                $route = $current->rawRoute();
            } else {
                $route = $current->route();
            }

            if ($showFullpath) {
                $option = $current->route();
            } else {
                $extra  = $showSlug ? '(' . $current->slug() . ') ' : '';
                $option = str_repeat('&mdash;-', $level). '&rtrif; ' . $extra . $current->title();


            }

            $list[$route] = $option;


        }

        if ($limitLevels === false || ($level+1 < $limitLevels)) {
            foreach ($current->children() as $next) {
                if ($showAll || $next->routable() || ($next->modular() && $showModular)) {
                    $list = array_merge($list, $this->getList($next, $level + 1, $rawRoutes, $showAll, $showFullpath, $showSlug, $showModular, $limitLevels));
                }
            }
        }

        return $list;
    }
1054328
public function view(string $id)
    {
        $entity = $this->fetchEntity($id);

        $this->set('entity', $entity);
        $this->render('CsvMigrations.Common/view');
        $this->set('_serialize', ['entity']);
    }
1348550
public function setCurrent($id)
    {
        $this->pointer = array_search($id, $this->ids);
        return $this->pointer;
    }
572548
public function loadModel($id, $language) 
	{
		$model = Message::model()->findByAttributes(array('id'=>$id, 'language'=>$language));
		if($model===null)
			throw new CHttpException(404, Yii::t('phrase', 'The requested page does not exist.'));
		return $model;
	}
1247243
public static function read_template($id) {
        global $PAGE;

        $params = self::validate_parameters(self::read_template_parameters(), array('id' => $id));
        $template = api::read_template($params['id']);
        self::validate_context($template->get_context());
        $output = $PAGE->get_renderer('core');

        $exporter = new template_exporter($template);
        $record = $exporter->export($output);
        return $record;
    }