// _DOC close [ADACCOUNT_GET_ADCAMPAIGNS]
$label = new AdLabel(null, $ad_account_id);
$label->{AdLabelFields::NAME} = 'ADACCOUNT_GET_ADCAMPAIGNS_LABEL';
$label->create();
$ad_label_id = $label->{AdLabelFields::ID};
// _DOC open [ADACCOUNT_GET_ADLABELS]
// _DOC vars [ad_account_id:s]
// use FacebookAds\Object\AdAccount;
$account = new AdAccount($ad_account_id);
$account->getAdLabels();
// _DOC close [ADACCOUNT_GET_ADLABELS]
// _DOC open [ADACCOUNT_GET_ADCAMPAIGNS_ADLABEL]
// _DOC vars [ad_account_id:s]
// use FacebookAds\Object\AdAccount;
$account = new AdAccount($ad_account_id);
$campaigns = $account->getAdCampaignsByLabel(array(), array('ad_label_ids' => array($ad_label_id)));
// _DOC close [ADACCOUNT_GET_ADCAMPAIGNS_ADLABEL]
// _DOC open [ADACCOUNT_GET_ADSETS_ADLABEL]
// _DOC vars [ad_account_id:s]
// use FacebookAds\Object\AdAccount;
$account = new AdAccount($ad_account_id);
$campaigns = $account->getAdSetsByLabel(array(), array('ad_label_ids' => array($ad_label_id)));
// _DOC close [ADACCOUNT_GET_ADSETS_ADLABEL]
// _DOC open [ADACCOUNT_GET_ADGROUPS_ADLABEL]
// _DOC vars [ad_account_id:s]
// use FacebookAds\Object\AdAccount;
$account = new AdAccount($ad_account_id);
$campaigns = $account->getAdGroupsByLabel(array(), array('ad_label_ids' => array($ad_label_id)));
// _DOC close [ADACCOUNT_GET_ADGROUPS_ADLABEL]
unset($account);
unset($campaigns);