Ejemplo n.º 1
0
 function __construct($image = null, $caption = '', $title = '', $subtitle = '', $parallax = false)
 {
     parent::__construct();
     if (get_sub_field('image') != null) {
         $this->image = get_sub_field('image');
     } else {
         $this->image = $image;
     }
     if (get_sub_field('caption') != null) {
         $this->caption = get_sub_field('caption');
     } else {
         $this->caption = $caption;
     }
     if (get_sub_field('title_image') != null) {
         $this->title = get_sub_field('title_image');
     } else {
         $this->title = $title;
     }
     if (get_sub_field('subtitle_image') != null) {
         $this->subtitle = get_sub_field('subtitle_image');
     } else {
         $this->subtitle = $subtitle;
     }
     if (get_sub_field('parallax') != null) {
         $this->parallax = get_sub_field('parallax');
     } else {
         $this->parallax = $parallax;
     }
 }
Ejemplo n.º 2
0
 function __construct()
 {
     parent::__construct();
     if (get_sub_field('video_url') != null) {
         $this->videoUrl = get_sub_field('video_url');
     }
     if (get_sub_field('layout_type') != null) {
         $this->layoutType = get_sub_field('layout_type');
     }
     if (get_sub_field('placeholder_image') != null) {
         $this->placeholderImage = get_sub_field('placeholder_image');
     }
     if (get_sub_field('direct_url') != null) {
         $this->directUrl = get_sub_field('direct_url');
     }
     if (get_sub_field('copy') != null) {
         $this->copy = get_sub_field('copy');
     }
     if (get_sub_field('') != null) {
         $this->copy = get_sub_field('copy');
     }
 }