标签:creat protected blog desc validate bsp cti serialize manager
protected function addItem($item) { $time = time(); if ($item->createdAt === null) { $item->createdAt = $time; } if ($item->updatedAt === null) { $item->updatedAt = $time; } $this->db->createCommand() ->insert($this->itemTable, [ //auth_item ‘name‘ => $item->name, ‘type‘ => $item->type, ‘description‘ => $item->description, ‘rule_name‘ => $item->ruleName, ‘data‘ => $item->data === null ? null : serialize($item->data), ‘created_at‘ => $item->createdAt, ‘updated_at‘ => $item->updatedAt, ])->execute(); $this->invalidateCache(); return true; }
yii\rbac\DbManager:addItem($item) 插入auth_item权限项目表 设置时间
标签:creat protected blog desc validate bsp cti serialize manager
原文地址:http://www.cnblogs.com/liadmin/p/6610770.html