Builds imagemap message strucutre.

@return array
960832
public function buildMessage()
    {
        if (!empty($this->message)) {
            return $this->message;
        }

        $actions = [];
        foreach ($this->imagemapActionBuilders as $builder) {
            $actions[] = $builder->buildImagemapAction();
        }

        $imagemapMessage = [
            'type' => MessageType::IMAGEMAP,
            'baseUrl' => $this->baseUrl,
            'altText' => $this->altText,
            'baseSize' => $this->baseSizeBuilder->build(),
            'actions' => $actions,
        ];

        if ($this->quickReply) {
            $imagemapMessage['quickReply'] = $this->quickReply->buildQuickReply();
        }

        if ($this->videoBuilder) {
            $imagemapMessage['video'] = $this->videoBuilder->build();
        }

        $this->message[] = $imagemapMessage;

        return $this->message;
    }
333319
protected function buildImage () {
    $method = 'buildImage'. ucfirst($this->preset->method);
    if (method_exists($this, $method)) {
      return $this->{$method}();
    }

    return FALSE;
  }
904229
final public function build()
    {
        return new ImageManager($this->getPath(), $this->getRootDir(), $this->getRootUrl(), $this->getConfig());
    }
766256
public function build()
    {
        $params = [
            'external_user_ids' => $this->externalUserIds,
            'segment_id' => $this->segmentId,
            'campaign_id' => $this->campaignId,
            'override_frequency_capping' => $this->overrideFrequencyCapping,
            'recipient_subscription_state' => $this->recipientSubscriptionState,
            'messages' => $this->messages,
        ];

        return array_filter($params, function ($param) {
            return $param !== null;
        });
    }
316858
public function buildMessage()
    {
        if (!empty($this->message)) {
            return $this->message;
        }

        $locationMessage = [
            'type' => MessageType::LOCATION,
            'title' => $this->title,
            'address' => $this->address,
            'latitude' => $this->latitude,
            'longitude' => $this->longitude,
        ];

        if ($this->quickReply) {
            $locationMessage['quickReply'] = $this->quickReply->buildQuickReply();
        }

        $this->message[] = $locationMessage;

        return $this->message;
    }
891931
private function buildParentMap()
    {
        $map = [];

        foreach ($this->configurations as $configuration) {
            if (null !== $parentId = $configuration->getParentId()) {
                $map[$configuration->getResourceId()] = $parentId;
            }
        }

        ksort($map);

        return $map;
    }
795098
public function getWidgetMapsForViewAndTemplates()
    {
        $widgetMaps = [];

        foreach ($this->getWidgetMaps() as $_widgetMap) {
            $widgetMaps[] = $_widgetMap;
        }

        if ($template = $this->getTemplate()) {
            $templateWidgetMaps = $template->getWidgetMapsForViewAndTemplates();
            $widgetMaps = array_merge($widgetMaps, $templateWidgetMaps);
        }

        return $widgetMaps;
    }
1336450
public static function getPropertyMap()
    {
        if (self::$property_map !== null) {
            return self::$property_map;
        }

        /** @var array<string, array<string, string>> */
        $property_map = require_once(__DIR__ . '/../PropertyMap.php');

        self::$property_map = [];

        foreach ($property_map as $key => $value) {
            $cased_key = strtolower($key);
            self::$property_map[$cased_key] = $value;
        }

        return self::$property_map;
    }
290223
public function getConfig(): array
    {
        $structure = [
            'locationMappings' => [],
            'defaultMappings' => [],
            'fallbackContentType' => $this->buildFallbackContentTypeStructure($this->fallbackContentType),
            'maxFileSize' => $this->maxFileSize,
        ];

        foreach ($this->locationMappings as $locationIdentifier => $locationConfiguration) {
            $structure['locationMappings'][$locationIdentifier] = [
                'contentTypeIdentifier' => $locationConfiguration['content_type_identifier'],
                'mimeTypeFilter' => $locationConfiguration['mime_type_filter'],
                'mappings' => [],
            ];

            foreach ($locationConfiguration['mappings'] as $mappingGroup) {
                $structure['locationMappings'][$locationIdentifier]['mappings'][] = $this->buildMappingGroupStructure($mappingGroup);
            }
        }

        foreach ($this->defaultMappings as $mappingGroup) {
            $structure['defaultMappings'][] = $this->buildMappingGroupStructure($mappingGroup);
        }

        return $structure;
    }
651556
protected function buildMessageWithAttachments()
    {
        $message = array();

        if (!empty($this->plainMessage) || !empty($this->htmlMessage)) {
            array_push($message, "--{$this->boundaryMixed}");
        }

        if (!empty($this->plainMessage) && !empty($this->htmlMessage)) {
            array_push($message, "Content-Type: multipart/alternative; boundary={$this->boundaryAlternative}");
            array_push($message, '');
            array_push($message, "--{$this->boundaryAlternative}");
            $message = array_merge($message, $this->buildPlainMessageHeader());
            array_push($message, $this->plainMessage);
            array_push($message, "--{$this->boundaryAlternative}");
            $message = array_merge($message, $this->buildHtmlMessageHeader());
            array_push($message, $this->htmlMessage);
            array_push($message, "--{$this->boundaryAlternative}--");
            array_push($message, '');
        } elseif (!empty($this->plainMessage)) {
            $message = array_merge($message, $this->buildPlainMessageHeader());
            array_push($message, $this->plainMessage);
        } elseif (!empty($this->htmlMessage)) {
            $message = array_merge($message, $this->buildHtmlMessageHeader());
            array_push($message, $this->htmlMessage);
        }
        foreach ($this->attachments as $attachment) {
            array_push($message, "--{$this->boundaryMixed}");
            array_push($message, "Content-Type: {$attachment['type']}; name=\"{$attachment['title']}\"");
            array_push($message, 'Content-Transfer-Encoding: base64');
            array_push($message, 'Content-Disposition: attachment');
            array_push($message, '');
            array_push($message, $this->buildAttachmentContent($attachment['path']));
        }
        array_push($message, "--{$this->boundaryMixed}--");

        return implode(self::LINE_BREAK, $message);
    }
1059189
public function buildMessage()
    {
        if (!empty($this->message)) {
            return $this->message;
        }

        foreach ($this->texts as $text) {
            $this->message[] = [
                'type' => MessageType::TEXT,
                'text' => $text,
            ];
        }

        if ($this->quickReply) {
            $lastKey = count($this->message) - 1;

            // If the user receives multiple message objects.
            // The quickReply property of the last message object is displayed.
            $this->message[$lastKey]['quickReply'] = $this->quickReply->buildQuickReply();
        }

        return $this->message;
    }
1262343
public function mapPosts()
    {
        if (!isset($this->data['posts']) || empty($this->data['posts'])) {
            return;
        }

        $posts = array();
        $imageDimension = array(1200, 675);
        $imageRatio = '16:9';
        $i = 0;

        foreach ($this->data['posts'] as $post) {
            if ($i == 0 && !get_field('posts_highlight', $this->data['ID']) || $i > 0) {
                $imageRatio = '4:3';
                $imageDimension = array(900, 675);
            }


            $post->image = $this->getFeaturedImageSource($post, $imageDimension, $imageRatio);
            $post->terms = $this->getTerms($post);

            $post->humanReadableTime = (get_field('posts_date_format', $this->data['ID']) == 'readable') ? $this->readableTimeStamp(strtotime($post->post_date)) . ' ' . __('ago', 'modularity') : false;

            $posts[] = $post;

            $i++;
        }

        $this->data['posts'] = $posts;
    }
384884
public function getAcceptImageMimeTypes()
    {
        $imageAllowFiles = $this->getSetting('imageAllowFiles');
        $extensions = explode(',', $imageAllowFiles);
        array_walk($extensions, function (&$value) {
            $value = 'image/' . $value;
        });
        return $extensions;
    }
793675
public function getMessages()
    {
        $message = new IncomingMessage(File::PATTERN, $this->event->get('from')['id'], $this->event->get('conversation')['id'],
            $this->payload);
        $message->setFiles($this->getAttachmentUrls());

        return [$message];
    }
537107
public function enaImageFiles()
    {
        $properties = $this->getProperties();
        $extString  = (!empty($properties['acceptedFiles'])) ? $properties['acceptedFiles'] : '';
        $imagExts   = $this->getImageExtensionConstant();
        foreach ($imagExts as $imagExt) {
            if (in_array($imagExt, $extString) === false) {
                $extString[] = $imagExt;
            }
        }
        $properties                     = $this->getProperties();
        $properties['acceptedFiles']    = $extString;
        $this->setProperties($properties);
        return $this;
    }
198528
protected function getMap(): array
    {
        $auth = $this->core->auth();
        $paths = [
            ['GET', '/sw.[i].js', function () {
                if (headers_sent() === false) {
                    header("Content-Type: application/javascript");
                }
                return file_get_contents(dirname(__DIR__) . "/files/sw.js");
            }],
            ['GET', '/offline', "Home@offline"],
        ];
        if ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/api/[**:link]?', "API"],
                ['GET', '/login', "Auth@showLogin", 'login-page'],
                ['GET', '/register', "Auth@showRegister", 'register-page'],
                ['GET', '/confirm', "Auth@confirm", 'confirm-page'],
                ['GET', '/forgot', "Auth@showForgot", 'forgot-page'],
                ['GET', '/reset/[a:reset_code]', "Auth@showReset", 'reset-page']
            ]);
        } else {
            $paths = array_merge($paths, [
                ['GET', '/api/[**:link]', "Auth@redirect"],
                ['GET', '/login', "Auth@redirect"],
                ['GET', '/register', "Auth@redirect"],
                ['GET', '/confirm', "Auth@confirm", 'confirm-page'],
                ['GET', '/forgot', "Auth@redirect"],
                ['GET', '/reset/[a:reset_code]', "Auth@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 5, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/', "User@showProfile", 'home-page'],
                ['GET', '/logout', "User@logout", 'logout-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/', "Home@redirect"],
                ['GET', '/logout', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 4, "max" => 4]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/users', "User@showList", 'users-list-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/users', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 4, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/pages/[i:page]?', "Page@showList", 'pages-list-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/pages/[i:page]?', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 3, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/pages/new', "Page@showNew", 'pages-new-page'],
                ['GET', '/pages/edit/[i:id]', "Page@showEdit", 'pages-edit-page'],
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/pages/new', "Home@redirect"],
                ['GET', '/pages/edit/[i:id]', "Home@redirect"],
            ]);
        }
        if ($auth->allow(["min" => 2, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/navigations', "Navigation@showNavigations", 'navigations-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/navigations', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 1, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/users/[i:page]?', "User@showList", 'users-list-page'],
                ['GET', '/users/new', "User@showNew", 'users-new-page'],
                ['GET', '/users/edit/[i:id]', "User@showEdit", 'users-edit-page'],
                ['GET', '/settings', "Site@showSettings", 'settings-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/users/[i:page]?', "Home@redirect"],
                ['GET', '/users/new', "Home@redirect"],
                ['GET', '/users/edit/[i:id]', "Home@redirect"],
                ['GET', '/settings', "Home@redirect"]
            ]);
        }
        return $paths;
    }
116205
private function buildLayouts()
    {
        return array_map(function($layout) {
            $layout = ($layout instanceof Builder) ? $layout->build() : $layout;
            return $this->transformLayout($layout);
        }, $this->getLayouts());
    }