当前位置: 首页>>代码示例>>PHP>>正文


PHP Activity::key方法代码示例

本文整理汇总了PHP中app\models\Activity::key方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::key方法的具体用法?PHP Activity::key怎么用?PHP Activity::key使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\models\Activity的用法示例。


在下文中一共展示了Activity::key方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: transform

 /**
  * @param Client $client
  * @return array
  */
 public function transform(Activity $activity)
 {
     return ['id' => $activity->key(), 'activity_type_id' => $activity->activity_type_id, 'client_id' => $activity->client->public_id, 'user_id' => $activity->user->public_id + 1, 'invoice_id' => $activity->invoice ? $activity->invoice->public_id : null, 'payment_id' => $activity->payment ? $activity->payment->public_id : null, 'credit_id' => $activity->credit ? $activity->credit->public_id : null, 'updated_at' => $this->getTimestamp($activity->updated_at)];
 }
开发者ID:rafaelsisweb,项目名称:invoice-ninja,代码行数:8,代码来源:ActivityTransformer.php

示例2: transform

 /**
  * @param Activity $activity
  * @return array
  */
 public function transform(Activity $activity)
 {
     return ['id' => $activity->key(), 'activity_type_id' => $activity->activity_type_id, 'client_id' => $activity->client ? $activity->client->public_id : null, 'user_id' => $activity->user->public_id + 1, 'invoice_id' => $activity->invoice ? $activity->invoice->public_id : null, 'payment_id' => $activity->payment ? $activity->payment->public_id : null, 'credit_id' => $activity->credit ? $activity->credit->public_id : null, 'updated_at' => $this->getTimestamp($activity->updated_at), 'expense_id' => $activity->expense_id ? $activity->expense->public_id : null, 'is_system' => (bool) $activity->is_system ? $activity->is_system : null, 'contact_id' => $activity->contact_id ? $activity->contact->public_id : null];
 }
开发者ID:hillelcoren,项目名称:invoice-ninja,代码行数:8,代码来源:ActivityTransformer.php


注:本文中的app\models\Activity::key方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。