本文整理匯總了PHP中app\models\Account::present方法的典型用法代碼示例。如果您正苦於以下問題:PHP Account::present方法的具體用法?PHP Account::present怎麽用?PHP Account::present使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\models\Account
的用法示例。
在下文中一共展示了Account::present方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: transform
public function transform(Account $account)
{
return ['account_key' => $account->account_key, 'name' => $account->present()->name, 'currency_id' => (int) $account->currency_id, 'timezone_id' => (int) $account->timezone_id, 'date_format_id' => (int) $account->date_format_id, 'datetime_format_id' => (int) $account->datetime_format_id, 'updated_at' => $this->getTimestamp($account->updated_at), 'archived_at' => $this->getTimestamp($account->deleted_at), 'address1' => $account->address1, 'address2' => $account->address2, 'city' => $account->city, 'state' => $account->state, 'postal_code' => $account->postal_code, 'country_id' => (int) $account->country_id, 'invoice_terms' => $account->invoice_terms, 'email_footer' => $account->email_footer, 'industry_id' => (int) $account->industry_id, 'size_id' => (int) $account->size_id, 'invoice_taxes' => (bool) $account->invoice_taxes, 'invoice_item_taxes' => (bool) $account->invoice_item_taxes, 'invoice_design_id' => (int) $account->invoice_design_id, 'client_view_css' => (string) $account->client_view_css, 'work_phone' => $account->work_phone, 'work_email' => $account->work_email, 'language_id' => (int) $account->language_id, 'fill_products' => (bool) $account->fill_products, 'update_products' => (bool) $account->update_products, 'vat_number' => $account->vat_number, 'custom_invoice_label1' => $account->custom_invoice_label1, 'custom_invoice_label2' => $account->custom_invoice_label2, 'custom_invoice_taxes1' => $account->custom_invoice_taxes1, 'custom_invoice_taxes2' => $account->custom_invoice_taxes1, 'custom_label1' => $account->custom_label1, 'custom_label2' => $account->custom_label2, 'custom_value1' => $account->custom_value1, 'custom_value2' => $account->custom_value2];
}
示例2: transform
public function transform(Account $account)
{
return ['account_key' => $account->account_key, 'name' => $account->present()->name, 'currency_id' => (int) $account->currency_id, 'timezone_id' => (int) $account->timezone_id, 'date_format_id' => (int) $account->date_format_id, 'datetime_format_id' => (int) $account->datetime_format_id, 'updated_at' => $account->updated_at, 'deleted_at' => $account->deleted_at, 'address1' => $account->address1, 'address2' => $account->address2, 'city' => $account->city, 'state' => $account->state, 'postal_code' => $account->postal_code, 'country_id' => (int) $account->country_id, 'invoice_terms' => $account->invoice_terms, 'email_footer' => $account->email_footer, 'industry_id' => (int) $account->industry_id, 'size_id' => (int) $account->size_id, 'invoice_taxes' => (bool) $account->invoice_taxes, 'invoice_item_taxes' => (bool) $account->invoice_item_taxes, 'invoice_design_id' => (int) $account->invoice_design_id, 'work_phone' => $account->work_phone, 'work_email' => $account->work_email, 'language_id' => (int) $account->language_id, 'fill_products' => (bool) $account->fill_products, 'update_products' => (bool) $account->update_products, 'vat_number' => $account->vat_number];
}
示例3: transform
public function transform(Account $account)
{
return ['account_key' => $account->account_key, 'name' => $account->present()->name];
}