The relatedTo
parameter accepts either a single element ID or model, or an array of element IDs or models. It doesn't accept asset source handles, section handles, or a particular element type constant.
This means that in order to pull all tags related to a specific element type, you'll need to give the relatedTo
parameter an array of all IDs for that particular element type.
You're not specific about what travelImages
are, but assuming it's an Asset source, something like this should work:
'elementType' => ElementType::Tag,
'criteria' => [
'relatedTo' => craft()->elements->getCriteria(ElementType::Asset, [
'limit' => null,
])->ids(),
'limit' => null,
],
Note that if travelImages
isn't an Asset source, you'll need to change ElementType::Asset
to the appropriate element type (e.g. ElementType::Entry
, ElementType::Category
etc).