[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/phpbb/profilefields/type/ -> type_googleplus.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  namespace phpbb\profilefields\type;
  15  
  16  class type_googleplus extends type_string
  17  {
  18      /**
  19      * {@inheritDoc}
  20      */
  21  	public function get_name()
  22      {
  23          return $this->user->lang('FIELD_GOOGLEPLUS');
  24      }
  25  
  26      /**
  27      * {@inheritDoc}
  28      */
  29  	public function get_service_name()
  30      {
  31          return 'profilefields.type.googleplus';
  32      }
  33  
  34      /**
  35      * {@inheritDoc}
  36      */
  37  	public function get_default_option_values()
  38      {
  39          return array(
  40              'field_length'            => 20,
  41              'field_minlen'            => 3,
  42              'field_maxlen'            => 255,
  43              'field_validation'        => '(?:(?!\.{2,})([^<>=+]))+',
  44              'field_novalue'            => '',
  45              'field_default_value'    => '',
  46          );
  47      }
  48  
  49      /**
  50      * {@inheritDoc}
  51      */
  52  	public function get_profile_contact_value($field_value, $field_data)
  53      {
  54          if (!$field_value && !$field_data['field_show_novalue'])
  55          {
  56              return null;
  57          }
  58  
  59          if (!is_numeric($field_value))
  60          {
  61              $field_value = '+' . $field_value;
  62          }
  63  
  64          return $field_value;
  65      }
  66  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1