CampaignService::mutateLabel PHP Method

mutateLabel() public method

Adds labels to the {@linkplain Campaign campaign} or removes {@linkplain Label label}s from the {@linkplain Campaign campaign}.

Add - Apply an existing label to an existing {@linkplain Campaign campaign}. The {@code campaignId} must reference an existing {@linkplain Campaign}. The {@code labelId} must reference an existing {@linkplain Label label}.

Remove - Removes the link between the specified {@linkplain Campaign campaign} and {@linkplain Label label}.

public mutateLabel ( $operations ) : a
return a list of {@linkplain CampaignLabel}s where each entry in the list is the result of applying the operation in the input list with the same index. For an add operation, the returned CampaignLabel contains the CampaignId and the LabelId. In the case of a remove operation, the returned CampaignLabel will only have CampaignId.
        public function mutateLabel($operations)
        {
            $args = new MutateLabel($operations);
            $result = $this->__soapCall("mutateLabel", array($args));
            return $result->rval;
        }