Пример #1
0
 /**
  * @inheritdoc
  */
 public function jsonSerialize()
 {
     $json = parent::jsonSerialize();
     $json['title'] = $this->title;
     $json['payload'] = $this->payload;
     return $json;
 }
Пример #2
0
 public function __construct()
 {
     parent::__construct(Button::TYPE_SHARE);
 }
Пример #3
0
 /**
  * @inheritdoc
  */
 public function jsonSerialize()
 {
     $json = parent::jsonSerialize();
     $json['url'] = $this->url;
     return $json;
 }
Пример #4
0
 public function __construct()
 {
     parent::__construct(Button::TYPE_ACCOUNT_UNLINK);
 }
Пример #5
0
 /**
  * @inheritdoc
  */
 public function jsonSerialize()
 {
     $json = parent::jsonSerialize();
     $json['title'] = $this->title;
     $json['url'] = $this->url;
     if (!empty($this->webviewHeightRatio)) {
         $json['webview_height_ratio'] = $this->webviewHeightRatio;
     }
     if ($this->messengerExtensions) {
         $json['messenger_extensions'] = $this->messengerExtensions;
     }
     if (!empty($this->fallbackUrl)) {
         $json['fallback_url'] = $this->fallbackUrl;
     }
     return $json;
 }