Create view data.

@param  mixed $data

@return array
507255
public function create_data( $data = [] ) {
		if ( is_object( $data ) && method_exists( $data, 'to_array' )  ) {
			return $data->to_array();
		}

		return is_array( $data ) ? $data : [];
	}
597484
public function create($data){
		$fileupload = \Yii::$app->fileupload;
		$file = $fileupload->createFile($this->ext, null, $this->pre);
		QRcode::png($data, $file['tmp'], $this->level, $this->size, $this->margin);

		return $fileupload->finalFile($file, 'images');
	}
403967
final public function render($data = array())
    {
        $context = $this->getContext();
        $context->data       = array_merge($this->getData(), $data);
        $context->action     = 'render';
        $context->parameters = array();

        if ($this->invokeCommand('before.render', $context) !== false)
        {
            //Render the view
            $context->result = $this->_actionRender($context);
            $this->invokeCommand('after.render', $context);
        }

        return $context->result;
    }
11885
public function create($data)
    {
        $response = $this->restClient->post($this->endpoint, $data);
        return $response['body'];
    }
259011
public function make($view, $data = [])
    {
        try {
            return $this->view->make($view, $data)->render();
        } catch (\InvalidArgumentException $e) {
            throw new ViewNotFoundException("No file found at '{$view}'");
        }
    }
456554
protected function buildData($data = [])
    {
        $user = $this->getUser();
        $data['user'] = $user;
        $data['layout'] = $this->getLayout();
        $data['categories'] = ForumCategory::with('forums')->get();
        $data['sitename'] = $this->getSitename();
        $data['wysiwyg'] = config('laravel-forum.wysiwyg');
        $data['sanitizer'] = $this->sanitizer;
        $data['userHelper'] = new UserHelper();
        if (Auth::check()) {
            $data['isAdmin'] = $user->can('create', Forum::class);
        }

        return $data;
    }
467767
public function createRequestData(array $data)
    {
        $data = $this
            ->getRequestOptionsResolver()
            ->resolve(array_replace($data, [
                'vads_page_action' => 'PAYMENT',
                'vads_version'     => 'V2',
            ]));

        $data = array_filter($data, function ($value) {
            return null !== $value;
        });

        $data['vads_site_id'] = $this->config['site_id'];
        $data['vads_ctx_mode'] = $this->config['ctx_mode'];

        $data['signature'] = $this->generateSignature($data);

        return $data;
    }
305975
public function createRow(array $data = array())
    {
        $cols     = $this->getColumns();
        $defaults = array_combine($cols, array_fill(0, count($cols), null));

        $config = array(
            'table'    => $this,
            'data'     => $defaults,
            'stored'   => false
        );

        $rowClass = $this->_rowClass;
        $row = new $rowClass($config);
        $row->setFromArray($data);
        return $row;
    }
1129533
final public function render($data = array())
    {
        $context = $this->getContext();
        $context->data = array_merge($this->getData(), $data);

        if ($this->invokeCommand('before.render', $context) !== false)
        {
            //Render the view
            $context->result = $this->_actionRender($context);
            $this->invokeCommand('after.render', $context);
        }

        //Set the content
        $this->setContent($context->result);

        return $context->result;
    }
37932
public function view($viewname, $data = '')
    {
        if (in_array($viewname, $this->viewset) === false) {
            $this->viewset[] = array($viewname, $data);
            $view = new View(Base::getInstance());
            $this->loaderHooks($view,'pre_view',$class='',$method_name='',$data=array());
            return $view;
        }
    }
148817
public function make($data)
    {
        $parts = $this->splitData($data['data'], ['meta', 'body']);

        $meta = self::parseYaml($parts['meta']);

        return $this->createAndFill([
            'id'     => $data['id'],
            'title'  => $meta['title'],
            'date'   => $data['date'],
            'data'   => isset($meta['data']) ? $meta['data'] : [],
            'body'   => $parts['body'],
        ]);
    }
996463
public function createNew($data)
    {
        $result = null;
        if (is_string($data)) {
            if (strpos($data, 'http') !== 0) {
                $data = 'http://'.$data;
            }
            $parsedUrl = parse_url($data);
            switch ($parsedUrl['host']) {
                case 'www.youtube.com':
                case 'youtube.com':
                    parse_str($parsedUrl['query'], $queryFields);
                    $code = $queryFields['v'];
                    $result = new Media();
                    $video = new RemoteVideoHelper($result);
                    $video->setType('youtube');
                    $video->setCode($code);
                    $result = $video->getMedia();
                    $result->setName('Youtube '.$code);
                    break;
                case 'www.vimeo.com':
                case 'vimeo.com':
                    $code = substr($parsedUrl['path'], 1);
                    $result = new Media();
                    $video = new RemoteVideoHelper($result);
                    $video->setType('vimeo');
                    $video->setCode($code);
                    $result = $video->getMedia();
                    $result->setName('Vimeo '.$code);
                    break;
                case 'www.dailymotion.com':
                case 'dailymotion.com':
                    $code = substr($parsedUrl['path'], 7);
                    $result = new Media();
                    $video = new RemoteVideoHelper($result);
                    $video->setType('dailymotion');
                    $video->setCode($code);
                    $result = $video->getMedia();
                    $result->setName('Dailymotion '.$code);
                    break;
            }
        }

        return $result;
    }
544307
public function createRules(array $data): array
    {
        return array_map(function ($data) {
            if ($data instanceof Rule) {
                return $data;
            }

            return Rule::createFromData((array) $data);
        }, $data);
    }
530084
public function buildViewData()
    {
        $data = $this->viewData;

        if (static::$viewDataCallback) {
            $data = array_merge($data, call_user_func(static::$viewDataCallback, $this));
        }

        foreach ((new ReflectionClass($this))->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {
            if ($property->getDeclaringClass()->getName() !== self::class) {
                $data[$property->getName()] = $property->getValue($this);
            }
        }

        return $data;
    }
616031
public function make( $view, $data = [] ) {
		return new View( $this, $this->engine, $this->view( $view ), $this->create_data( $data ) );
	}
1079841
public function createNewRecord($data) {
        $list_email = new $this->model;

        $list_email->title      = $data['list_id']." ".$data['email_id'];
        $list_email->list_id    = $data['list_id'];
        $list_email->email_id   = $data['email_id'];
        $list_email->comments   = $data['comments'];
        $list_email->enabled    = $data['enabled'];
        $list_email->created_at = $data['created_at'];
        $list_email->created_by = $data['created_by'];
        $list_email->updated_at = $data['updated_at'];
        $list_email->updated_by = $data['updated_by'];
        $list_email->locked_at  = null;
        $list_email->locked_by  = null;

        if ($list_email->save()) {

            // Return the new ID
            return $list_email->id;
        }

        return false;
    }
1295999
protected function getFields($data)
    {
        if (is_array($data)) {
            $fields = $data;
        } else {
            $this->checkData($data);
            $fields = $data->fields();
        }

        return $fields;
    }