Returns storage by message type

@param string $messageType
@return Mage_Core_Model_Session_Abstract|bool
355150
public function getStorageByMessageType($messageType)
    {
        if ($this->messageTypes === null) {
            $this->getMessageTypes();
        }

        if (!isset($this->messageTypes[$messageType])) {
            return false;
        }

        return Mage::getSingleton($this->messageTypes[$messageType]);
    }
719310
protected function assertValidMessageType($messageType)
    {
        if (!in_array($messageType, [self::TYPE_PHP, self::TYPE_SAPI], true)) {
            throw new \InvalidArgumentException('MessageType "%s" is not valid', $messageType);
        }
    }
281266
public function getMessage($messageId)
    {
        $this->buildCall('/incoming-messages');
        $this->buildCall('/'.$messageId);

        $rawMessage = $this->getRequest()->json();

        return $this->makeMessage($rawMessage['Response']['Entry']);
    }
1003712
public function getFirstNotice(string $messageTypeFilter = null)
    {
        $matchingNotices = $this->filterMessages($this->notices, $messageTypeFilter);
        reset($matchingNotices);
        return current($matchingNotices);
    }
385610
public function getMessageTypes($action, Entity $entity) {
    // Init.
    $messagetypes = [];

    // We need the entitytype manager.
    $entity_type_manager = \Drupal::service('entity_type.manager');
    // Message type storage.
    $message_storage = $entity_type_manager->getStorage('message_template');

    // Check all enabled messages.
    foreach ($message_storage->loadByProperties(['status' => '1']) as $key => $messagetype) {
      $mt_entity_bundles = $messagetype->getThirdPartySetting('activity_logger', 'activity_bundle_entities', NULL);
      $mt_action = $messagetype->getThirdPartySetting('activity_logger', 'activity_action', NULL);
      $mt_context = $messagetype->getThirdPartySetting('activity_logger', 'activity_context', NULL);
      $mt_destinations = $messagetype->getThirdPartySetting('activity_logger', 'activity_destinations', NULL);
      $mt_entity_condition = $messagetype->getThirdPartySetting('activity_logger', 'activity_entity_condition', NULL);

      if (!empty($mt_entity_condition)) {
        $entity_condition_factory = \Drupal::service('plugin.manager.activity_entity_condition.processor');
        $entity_condition_plugin = $entity_condition_factory->createInstance($mt_entity_condition);
        $entity_condition = $entity_condition_plugin->isValidEntityCondition($entity);
      }
      else {
        $entity_condition = TRUE;
      }

      $activity_context_factory = \Drupal::service('plugin.manager.activity_context.processor');
      $context_plugin = $activity_context_factory->createInstance($mt_context);

      $entity_bundle_name = $entity->getEntityTypeId() . '-' . $entity->bundle();
      if (in_array($entity_bundle_name, $mt_entity_bundles)
        && $context_plugin->isValidEntity($entity)
        && $entity_condition
        && $action === $mt_action
      ) {
        $messagetypes[$key] = [
          'messagetype' => $messagetype,
          'bundle' => $entity_bundle_name,
          'destinations' => $mt_destinations,
          'context' => $mt_context,
        ];
      }
    }
    // Return the message types that belong to the requested action.
    return $messagetypes;
  }
69820
public function get($type = null)
    {
        if (!$type) {
            return $this->messages;
        }

        if (isset($this->messages[$type])) {
            return $this->messages[$type];
        }

        return [];
    }
514561
public function addStorageType($type)
    {
        parent::addStorageType($type);

        if (!is_string($type)) {
            return $this;
        }

        foreach ($this->getMessageCollection()->getItems() as $item) {
            $this->storageMessages[$type][] = $item;
        }

        $this->getMessageCollection()->clear();
        return $this;
    }
862193
public static function add(string $messageType, string $message): void
    {
        $_SESSION[self::SESSION_KEY][$messageType][] = $message;
    }
1198513
public List<ConversionMessage> getMessages( ConversionMessageType messageType ) {
        List<ConversionMessage> messages = new ArrayList<ConversionMessage>();
        for ( ConversionMessage message : this.messages ) {
            if ( message.getMessageType() == messageType ) {
                messages.add( message );
            }
        }
        return messages;
    }
578863
protected function _loadMessagesFromStorage($type) {
        foreach (Mage::getSingleton($type)
                    ->getMessages(true)->getItems() as $msg) {
            parent::addMessage($msg);
        }
    }
1209511
public function getPage4Type($type)
    {
        $cachingKey = Caching::PAGE_INFO . '_' . $type;

        $pageInfo = $this->cachingHelperService->getItem($cachingKey, function () use ($type) {
            /** @var \PServerCore\Entity\Repository\PageInfo $repository */
            $repository = $this->entityManager->getRepository(
                $this->collectionOptions->getEntityOptions()->getPageInfo()
            );
            return $repository->getPageData4Type($type);
        });

        return $pageInfo;
    }
74906
public function transport($type = 'smtp')
    {
        if ($type == 'smtp') {
            return $this->getSmtpTransport();
        } elseif ($type == 'sendmail') {
            return $this->getSendMailTransport();
        }

        return $this->getMailTransport();
    }
1061179
protected function getContentObject(array $contenttype, array $values)
    {
        if (empty($contenttype['class'])) {
            return new Content($this->app, $contenttype, $values);
        }

        if (class_exists($contenttype['class'])) {
            $content = new $contenttype['class']($this->app, $contenttype, $values);

            if (!($content instanceof Content)) {
                throw new StorageException($contenttype['class'] . ' does not extend \\Bolt\\Content.');
            }

            return $content;
        }

        $msg = sprintf('The ContentType %s has an invalid class specified "%s". Unable to log the changes to its records', $contenttype['slug'], $contenttype['class']);
        $this->app['logger.system']->error($msg, ['event' => 'content']);

        throw new StorageException($msg);
    }
787595
public function store($data)
    {
        $message = $this->client->post(
            sprintf('buckets/%d/categories.json', $this->bucket),
            [
                'json' => $data,
            ]
        );

        return new MessageType($this->response($message));
    }
651344
public function getMessages($type)
    {
        return $this->hasMessages($type)
            ? $_SESSION[$this->alias][$type]
            : null;
    }
664522
public function getType(string $type): Type
    {
        if (isset($this->types[$type])) {
            return $this->types[$type];
        }

        $instance = $this->createType($type);
        $this->addType($instance);
        $this->types[$type] = $instance;

        return $instance;
    }
94079
protected function getMessagesForRender($type = null)
    {
        if (is_null($type)) {
            if (count($this->groupForRender) > 0) {
                $messages = array();

                foreach ($this->groupForRender as $typeToRender) {
                    $messages = array_merge($messages, $this->get($typeToRender)->all());
                }

                return new Collection($messages);
            }

            return $this->all();
        }
        return $this->get($type);
    }