Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Drupal\Core\Field\Plugin\Field\FieldType; use Drupal\Component\Utility\R..
Decoded Output download
<?php
namespace Drupal\Core\Field\Plugin\Field\FieldType;
use Drupal\Component\Utility\Random;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
/**
* Defines the 'string_long' field type.
*
* @FieldType(
* id = "string_long",
* label = @Translation("Text (plain, long)"),
* description = @Translation("A field containing a long string value."),
* category = @Translation("Text"),
* default_widget = "string_textarea",
* default_formatter = "basic_string",
* )
*/
class StringLongItem extends StringItemBase {
/**
* {@inheritdoc}
*/
public static function schema(FieldStorageDefinitionInterface $field_definition) {
return [
'columns' => [
'value' => [
'type' => $field_definition->getSetting('case_sensitive') ? 'blob' : 'text',
'size' => 'big',
],
],
];
}
/**
* {@inheritdoc}
*/
public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
$random = new Random();
$values['value'] = $random->paragraphs();
return $values;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Drupal\Core\Field\Plugin\Field\FieldType;
use Drupal\Component\Utility\Random;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
/**
* Defines the 'string_long' field type.
*
* @FieldType(
* id = "string_long",
* label = @Translation("Text (plain, long)"),
* description = @Translation("A field containing a long string value."),
* category = @Translation("Text"),
* default_widget = "string_textarea",
* default_formatter = "basic_string",
* )
*/
class StringLongItem extends StringItemBase {
/**
* {@inheritdoc}
*/
public static function schema(FieldStorageDefinitionInterface $field_definition) {
return [
'columns' => [
'value' => [
'type' => $field_definition->getSetting('case_sensitive') ? 'blob' : 'text',
'size' => 'big',
],
],
];
}
/**
* {@inheritdoc}
*/
public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
$random = new Random();
$values['value'] = $random->paragraphs();
return $values;
}
}
Function Calls
None |
Stats
MD5 | 6417c0e0c5ce6a818b2497d76f5f6dc7 |
Eval Count | 0 |
Decode Time | 96 ms |