public function ProtectedPagesStorage::insertProtectedPage in Protected Pages 8
Insert data into protected pages table.
Parameters
array $page_data: An array containing all values.
Return value
int The protected page id.
File
- src/
ProtectedPagesStorage.php, line 39
Class
- ProtectedPagesStorage
- Defines the protected page storage service.
Namespace
Drupal\protected_pagesCode
public function insertProtectedPage(array $page_data) {
$query = $this->connection
->insert('protected_pages')
->fields([
'password',
'path',
])
->values($page_data);
$pid = $query
->execute();
return $pid;
}