Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fillpdf
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
fillpdf
Commits
005f34a5
Commit
005f34a5
authored
2 years ago
by
Liam Morland
Committed by
Liam Morland
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue #3124168: Allow longer values for pdf_key
parent
46ab67eb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fillpdf.install
+27
-0
27 additions, 0 deletions
fillpdf.install
src/Entity/FillPdfFormField.php
+1
-1
1 addition, 1 deletion
src/Entity/FillPdfFormField.php
with
28 additions
and
1 deletion
fillpdf.install
+
27
−
0
View file @
005f34a5
...
@@ -278,3 +278,30 @@ function fillpdf_update_8111() {
...
@@ -278,3 +278,30 @@ function fillpdf_update_8111() {
$edum
->
installFieldStorageDefinition
(
'owner_password'
,
'fillpdf_form'
,
'fillpdf_form'
,
$owner_password
);
$edum
->
installFieldStorageDefinition
(
'owner_password'
,
'fillpdf_form'
,
'fillpdf_form'
,
$owner_password
);
$edum
->
installFieldStorageDefinition
(
'user_password'
,
'fillpdf_form'
,
'fillpdf_form'
,
$user_password
);
$edum
->
installFieldStorageDefinition
(
'user_password'
,
'fillpdf_form'
,
'fillpdf_form'
,
$user_password
);
}
}
/**
* Increase maximum length for pdf_key.
*/
function
fillpdf_update_9501
()
{
$db
=
\Drupal
::
database
();
$transaction
=
$db
->
startTransaction
();
// Update field storage definition.
$edum
=
\Drupal
::
entityDefinitionUpdateManager
();
$field_storage_definition
=
$edum
->
getFieldStorageDefinition
(
'pdf_key'
,
'fillpdf_form_field'
);
$field_storage_definition
->
setSetting
(
'type'
,
'string_long'
);
$edum
->
updateFieldStorageDefinition
(
$field_storage_definition
);
// Update database schema.
$spec
=
[
'type'
=>
'text'
,
'size'
=>
'big'
,
];
$db
->
schema
()
->
changeField
(
'fillpdf_fields'
,
'pdf_key'
,
'pdf_key'
,
$spec
);
// Commit transaction.
unset
(
$transaction
);
}
This diff is collapsed.
Click to expand it.
src/Entity/FillPdfFormField.php
+
1
−
1
View file @
005f34a5
...
@@ -56,7 +56,7 @@ class FillPdfFormField extends ContentEntityBase implements FillPdfFormFieldInte
...
@@ -56,7 +56,7 @@ class FillPdfFormField extends ContentEntityBase implements FillPdfFormFieldInte
->
setDescription
(
t
(
'The UUID of the FillPdfFormField entity.'
))
->
setDescription
(
t
(
'The UUID of the FillPdfFormField entity.'
))
->
setReadOnly
(
TRUE
);
->
setReadOnly
(
TRUE
);
$fields
[
'pdf_key'
]
=
BaseFieldDefinition
::
create
(
'string'
)
$fields
[
'pdf_key'
]
=
BaseFieldDefinition
::
create
(
'string
_long
'
)
->
setLabel
(
t
(
'PDF Key'
))
->
setLabel
(
t
(
'PDF Key'
))
->
setDescription
(
t
(
'The name of the field in the PDF form.'
));
->
setDescription
(
t
(
'The name of the field in the PDF form.'
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment