@param array $data
@return CustomerTitleEvent

Handler to create the customer title event
481567
protected function createEvent(array &$data)
    {
        $event = new CustomerTitleEvent();

        if (isset($data["default"])) {
            $event->setDefault($data["default"]);
        }

        if (isset($data["title_id"])) {
            $event->setCustomerTitle(CustomerTitleQuery::create()->findPk($data["title_id"]));
        }

        if (isset($data["i18n"]) && !empty($data["i18n"])) {
            $row = array_shift($data["i18n"]);

            $this->hydrateEvent($row, $event);
        }

        return $event;
    }
99512
public function create($data)
    {
        $seo = new SeoViewObject();

        if (empty($data)) {
            return $seo;
        }

        $seo->title = $data['title'];
        $seo->description = $data['description'];
        $seo->keywords = $data['keywords'];
        $seo->canonicalUrl = $data['canonicalUrl'];
        $seo->noIndex = $data['noIndex'];
        $seo->noFollow = $data['noFollow'];
        $seo->hideInSitemap = $data['hideInSitemap'];

        return $seo;
    }
1320885
public function setEventTitle(array $data, EntityInterface $calendar): string
    {
        $title = (!empty($data['CalendarEvents']['title']) ? $data['CalendarEvents']['title'] : '');

        if (empty($title)) {
            $title .= !empty($calendar->name) ? $calendar->name : '';

            if (!empty($data['CalendarEvents']['event_type'])) {
                $title .= ' - ' . Inflector::humanize($data['CalendarEvents']['event_type']);
            } else {
                $title .= ' Event';
            }
        }

        return $title;
    }
278107
private function createEventFromResponseContent(array $content): Event
    {
        $type = $content['eventType'];
        $version = (int) $content['eventNumber'];
        $data = $content['data'];
        $metadata = (!empty($content['metadata'])) ? $content['metadata'] : null;
        $eventId = (!empty($content['eventId']) ? UUID::fromNative($content['eventId']) : null);

        return new Event($type, $version, $data, $metadata, $eventId);
    }
453646
private function _handleInvoiceCreated(array $data)
    {
        $stripeInvoice = $data['data']['object'];

        if ($this->hasEventHandlers(self::EVENT_CREATE_INVOICE)) {
            $this->trigger(self::EVENT_CREATE_INVOICE, new CreateInvoiceEvent([
                'invoiceData' => $stripeInvoice
            ]));
        }

        $canBePaid = empty($stripeInvoice['paid']) && $stripeInvoice['billing'] === 'charge_automatically';

        if (StripePlugin::getInstance()->getSettings()->chargeInvoicesImmediately && $canBePaid) {
            /** @var StripeInvoice $invoice */
            $invoice = StripeInvoice::retrieve($stripeInvoice['id']);
            $invoice->pay();
        }
    }
127947
protected function createSubscribeEvent(array $data)
    {
        if (isset($data['EventKey']) && isset($data['Ticket']) && (WxReceiveEvent::EVENT_TYPE_SUBSCRIBE == $data['Event'])) {
            return $this->createScanEvent($data);
        }

        $result = new WxReceiveSubscribeEvent();
        $this->initReceive($result, $data);
        $result->setEvent($data['Event']);

        return $result;
    }
1218684
public function setCustomer($data = [])
    {
        if (array_key_exists('name', $data)) {
            $this->setCustomerName($data['name']);
        }

        if (array_key_exists('email', $data)) {
            $this->setCustomerEmail($data['email']);
        }

        if (array_key_exists('number', $data)) {
            $this->setCustomerMsisdn($data['number']);
        }

        if (array_key_exists('phone', $data)) {
            $this->setCustomerMsisdn($data['phone']);
        }

        if (array_key_exists('msisdn', $data)) {
            $this->setCustomerMsisdn($data['msisdn']);
        }

        return $this;
    }
517414
public function generate($data){
		$this->setTitle(BLang::_('USERS_REGISTER_HTML_TITLE'));
		$this->addMeta('description',BLang::_('USERS_REGISTER_METADESC'));
		return $this->templateLoad();
		}
283961
public function create(array $data)
    {
        $data = self::mergeData($data, [
            'finished' => false,
            'smContactTaskReq' => [
                'id' => false,
            ],
        ]);

        return $this->client->doPost('contact/updateTask', $data);
    }
1031733
public static function show($data, string $title = '', array $opts = [])
    {
        $string = '';
        $opts   = \array_merge([
            'leftChar'    => '  ',
            // 'sepChar' => '  ',
            'keyStyle'    => 'info',
            'keyMinWidth' => 8,
            'titleStyle'  => 'comment',
            'returned'    => false,
            'lastNewline' => true,
        ], $opts);

        // title
        if ($title) {
            $title  = \ucwords(\trim($title));
            $string .= ColorTag::wrap($title, $opts['titleStyle']) . \PHP_EOL;
        }

        // handle item list
        $string .= FormatUtil::spliceKeyValue((array)$data, $opts);

        // return formatted string.
        if ($opts['returned']) {
            return $string;
        }

        return Console::write($string, $opts['lastNewline']);
    }
298166
public function create(array $data = array())
    {
        if (!isset($data["configPathPrefix"])) {
            $data["configPathPrefix"] = $this->configPathPrefix;
        }
        return $this->_objectManager->create($this->_instanceName, $data);
    }
1052575
protected function createViewEvent(array $data)
    {
        $result = new WxReceiveViewEvent();
        $this->initReceive($result, $data);

        $result->setEventKey($data['EventKey']);

        return $result;
    }
532556
public function create(array $data)
    {
        $model = $this->app->make($this->model());
        $model->fill($data);

        $wasSaved = $model->save();

        if ($wasSaved) {
            return $this->find($model->id);
        }

        $errorMessage = "Não foi possível salvar.";

        if (method_exists($model, 'isValid')) {
            $exception = new ValidationException();
            $exception->setMessages($model->getValidationErrors()->all());

            throw $exception;
        }
        throw new ApiException($errorMessage);

    }
1303142
function factory(array $data) {
        $presence = new \CharlotteDunois\Yasmin\Models\Presence($this->client, $data);
        $this->set($presence->userID, $presence);
        return $presence;
    }
1021787
public static function createFromArray(array $data)
    {
        $self = new self();

        if (isset($data['id'])) {
            $self->setId($data['id']);
        }
        if (isset($data['content'])) {
            $self->setContent($data['content']);
        }
        if (isset($data['unverified'])) {
            $self->setUnverified($data['unverified']);
        }
        if (isset($data['excluded'])) {
            $self->setExcluded($data['excluded']);
        }
        if (isset($data['plural_suffix'])) {
            $self->setPluralSuffix($data['plural_suffix']);
        }
        if (isset($data['created_at'])) {
            $self->setCreatedAt($data['created_at']);
        }
        if (isset($data['updated_at'])) {
            $self->setUpdatedAt($data['updated_at']);
        }
        if (isset($data['placeholders'])) {
            $self->setPlaceholders($data['placeholders']);
        }
        if (isset($data['word_count'])) {
            $self->setWordCount($data['word_count']);
        }
        if (isset($data['key']) && is_array($data['key'])) {
            $self->setKey(Key::createFromArray($data['key']));
        }
        if (isset($data['locale']) && is_array($data['locale'])) {
            $self->setLocale(Locale::createFromArray($data['locale']));
        }
        if (isset($data['user']) && is_array($data['user'])) {
            $self->setUser(User::createFromArray($data['user']));
        }

        return $self;
    }
304311
protected function create(array $data)
    {
        $user = UserModel::create($data);
        return User::find($user->id);
    }
276
public function create(array $data)
    {
        if (! array_key_exists('name', $data)) {
            $data['name'] = Str::slug($data['display_name']);
        }

        return parent::create($data);
    }