Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
new_project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Telenkov Ruslan
new_project
Commits
612b62b3
Commit
612b62b3
authored
Jun 02, 2022
by
Telenkov Ruslan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
this is rest api task
parent
e3741c51
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
432 additions
and
12 deletions
+432
-12
composer.json
app/composer.json
+1
-0
composer.lock
app/composer.lock
+57
-1
formApi.info.yml
app/docroot/modules/custom/formApi/formApi.info.yml
+0
-0
MyService.php
...oot/modules/custom/myservice/src/Controller/MyService.php
+2
-2
GetUserByEmailResource.php
...block/src/Plugin/rest/resource/GetUserByEmailResource.php
+314
-0
testblock.info.yml
app/docroot/modules/custom/testblock/testblock.info.yml
+5
-2
TestPage.php
...docroot/modules/custom/thanks/src/Controller/TestPage.php
+16
-0
dummy-example-first.html.twig
...les/custom/thanks/templates/dummy-example-first.html.twig
+3
-0
thanks.info.yml
app/docroot/modules/custom/thanks/thanks.info.yml
+1
-1
thanks.module
app/docroot/modules/custom/thanks/thanks.module
+20
-0
thanks.routing.yml
app/docroot/modules/custom/thanks/thanks.routing.yml
+7
-0
local.services.yml
app/docroot/sites/local.services.yml
+3
-3
prj-settings.inc
app/docroot/sites/prj-settings.inc
+3
-3
No files found.
app/composer.json
View file @
612b62b3
...
...
@@ -40,6 +40,7 @@
"drupal/rabbit_hole"
:
"^2.26"
,
"drupal/recaptcha"
:
"^3.0"
,
"drupal/redirect"
:
"^1.7"
,
"drupal/restui"
:
"^1.20"
,
"drupal/search_api"
:
"^1.23"
,
"drupal/search_api_autocomplete"
:
"^1.6"
,
"drupal/shariff"
:
"^1.5"
,
...
...
app/composer.lock
View file @
612b62b3
...
...
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "
f3d718dfa53852c7031069d608f69011
",
"content-hash": "
1b24d35c84763c2fdcf7e4fca5e5d99e
",
"packages": [
{
"name": "asm89/stack-cors",
...
...
@@ -4222,6 +4222,62 @@
"source": "https://git.drupalcode.org/project/redirect"
}
},
{
"name": "drupal/restui",
"version": "1.20.0",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/restui.git",
"reference": "8.x-1.20"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/restui-8.x-1.20.zip",
"reference": "8.x-1.20",
"shasum": "df1d3c486ee0e7b4e9a24e6523a69c9efe73caff"
},
"require": {
"drupal/core": "^8.7.7 || ^9"
},
"type": "drupal-module",
"extra": {
"drupal": {
"version": "8.x-1.20",
"datestamp": "1616839543",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0-or-later"
],
"authors": [
{
"name": "-enzo-",
"homepage": "https://www.drupal.org/user/294937"
},
{
"name": "clemens.tolboom",
"homepage": "https://www.drupal.org/user/125814"
},
{
"name": "juampynr",
"homepage": "https://www.drupal.org/user/682736"
},
{
"name": "klausi",
"homepage": "https://www.drupal.org/user/262198"
}
],
"description": "Provides a user interface to manage REST resources.",
"homepage": "https://www.drupal.org/project/restui",
"support": {
"source": "https://git.drupalcode.org/project/restui"
}
},
{
"name": "drupal/search_api",
"version": "1.23.0",
...
...
app/docroot/modules/custom/formApi/formApi.info.yml
0 → 100644
View file @
612b62b3
app/docroot/modules/custom/myservice/src/Controller/MyService.php
View file @
612b62b3
...
...
@@ -214,8 +214,8 @@ class MyService
public
function
createPeopleNode
(
$data
,
$node_id
){
$node
=
Node
::
create
(
array
(
'type'
=>
'people'
,
'title'
=>
/*'people' . $counter[0][0]*/
$data
->
name
,
'field_swapi_id'
=>
$node_id
,
'title'
=>
$data
->
name
,
//
'field_swapi_id' => $node_id,
'field_name'
=>
$data
->
name
,
'field_height'
=>
$data
->
height
,
'field_mass'
=>
$data
->
mass
,
...
...
app/docroot/modules/custom/testblock/src/Plugin/rest/resource/GetUserByEmailResource.php
0 → 100644
View file @
612b62b3
This diff is collapsed.
Click to expand it.
app/docroot/modules/custom/testblock/testblock.info.yml
View file @
612b62b3
name
:
Test
description
:
Creates a page showing "Bootcamp".
name
:
Test
RestApi
description
:
Rest Api module
package
:
Custom
type
:
module
core_version_requirement
:
^8.8 || ^9
dependencies
:
-
rest
app/docroot/modules/custom/thanks/src/Controller/TestPage.php
0 → 100644
View file @
612b62b3
<?php
namespace
Drupal\thanks\Controller
;
class
TestPage
{
public
function
content
(){
/**
* {@inheritdoc}
*/
return
[
'#theme'
=>
'dummy_example_first'
,
];
}
}
app/docroot/modules/custom/thanks/templates/dummy-example-first.html.twig
0 → 100644
View file @
612b62b3
<p>
Сейчас
{{
date
}}
</p>
app/docroot/modules/custom/thanks/thanks.info.yml
View file @
612b62b3
name
:
Test
B
name
:
Test
Hook Theme
description
:
Creates a page showing "Bootcamp".
package
:
Custom
type
:
module
...
...
app/docroot/modules/custom/thanks/thanks.module
0 → 100644
View file @
612b62b3
<?php
/**
* Implements hook_theme().
*/
function
thanks_theme
(
$existing
,
$type
,
$theme
,
$path
)
{
return
[
'dummy_example_first'
=>
[
'variables'
=>
[],
],
];
}
/**
* Implements template_preprocess_HOOK().
* Обработчик переменных для первого примера.
*/
function
template_preprocess_dummy_example_first
(
&
$variables
)
{
$date_formatter
=
\Drupal
::
service
(
'date.formatter'
);
$variables
[
'date'
]
=
$date_formatter
->
format
(
time
());
}
app/docroot/modules/custom/thanks/thanks.routing.yml
0 → 100644
View file @
612b62b3
thanks.test-page
:
path
:
'
/test-page'
defaults
:
_controller
:
'
\Drupal\thanks\Controller\TestPage::content'
_title
:
'
Test'
requirements
:
_permission
:
'
access
content'
app/docroot/sites/local.services.yml
View file @
612b62b3
...
...
@@ -9,6 +9,6 @@ parameters:
debug
:
true
auto_reload
:
true
cache
:
false
services
:
cache.backend.null
:
class
:
Drupal\Core\Cache\NullBackendFactory
#
services:
#
cache.backend.null:
#
class: Drupal\Core\Cache\NullBackendFactory
app/docroot/sites/prj-settings.inc
View file @
612b62b3
...
...
@@ -123,8 +123,8 @@ switch ($current_env) {
$settings
[
'trusted_host_patterns'
]
=
[];
// Disable caching during development.
$settings
[
'cache'
][
'bins'
][
'render'
]
=
'cache.backend.null'
;
$settings
[
'cache'
][
'bins'
][
'dynamic_page_cache'
]
=
'cache.backend.null'
;
$settings
[
'cache'
][
'bins'
][
'page'
]
=
'cache.backend.null'
;
//
$settings['cache']['bins']['render'] = 'cache.backend.null';
//
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
//
$settings['cache']['bins']['page'] = 'cache.backend.null';
break
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment