original_string: public function updateCMSFields(FieldList $fields)
      {
          $msg = _t('JonoM\ShareCare\ShareCare.CMSMessage', 'When this page is shared by people on social media it will look something like this:');
          $tab = 'Root.' . _t('JonoM\ShareCare\ShareCare.TabName', 'Share');
          if ($msg) {
              $fields->addFieldToTab($tab, new LiteralField('ShareCareMessage',
                  '<div class="message notice"><p>' . $msg . '</p></div>'));
          }
          $fields->addFieldToTab($tab, new LiteralField('ShareCarePreview',
              $this->owner->RenderWith('ShareCarePreview', array(
                  'IncludeTwitter' => self::config()->get('twitter_card'),
                  'IncludePinterest' => self::config()->get('pinterest')
              ))));
      }
code: public function updateCMSFields(FieldList $fields)
      {
          $msg = _t('JonoM\ShareCare\ShareCare.CMSMessage', 'When this page is shared by people on social media it will look something like this:');
          $tab = 'Root.' . _t('JonoM\ShareCare\ShareCare.TabName', 'Share');
          if ($msg) {
              $fields->addFieldToTab($tab, new LiteralField('ShareCareMessage',
                  '<div class="message notice"><p>' . $msg . '</p></div>'));
          }
          $fields->addFieldToTab($tab, new LiteralField('ShareCarePreview',
              $this->owner->RenderWith('ShareCarePreview', array(
                  'IncludeTwitter' => self::config()->get('twitter_card'),
                  'IncludePinterest' => self::config()->get('pinterest')
              ))));
      }
code_tokens: public function updateCMSFields ( FieldList $ fields ) { $ msg = _t ( 'JonoM\ShareCare\ShareCare.CMSMessage' , 'When this page is shared by people on social media it will look something like this:' ) ; $ tab = 'Root.' . _t ( 'JonoM\ShareCare\ShareCare.TabName' , 'Share' ) ; if ( $ msg ) { $ fields -> addFieldToTab ( $ tab , new LiteralField ( 'ShareCareMessage' , '<div class="message notice"><p>' . $ msg . '</p></div>' ) ) ; } $ fields -> addFieldToTab ( $ tab , new LiteralField ( 'ShareCarePreview' , $ this -> owner -> RenderWith ( 'ShareCarePreview' , array ( 'IncludeTwitter' => self :: config ( ) -> get ( 'twitter_card' ) , 'IncludePinterest' => self :: config ( ) -> get ( 'pinterest' ) ) ) ) ) ; }
docstring: Add a Social Media tab with a preview of share appearance to the CMS.
docstring_tokens: Add a Social Media tab with a preview of share appearance to the CMS .