Config DataSource to Dual List

@param IteratorInterface $listLeft
@param IteratorInterface $listRight
495874
public function setDataSource($listLeft, $listRight = null)
	{
		$this->_listLeftDataSource = $listLeft;
		$this->_listRightDataSource = $listRight;
	}
1167202
public function sendEmails($listID, $data) {

        // if the list is not enabled, then return false
        if (!$this->helpers->isListEnabled($listID)) {
            return false;
        }

        $emailData = [];

        // subject
        $emailData['subject'] = $this->helpers->getListNameFromListID($listID) . ' - ' . $data['title'];

        // build the individual emails
        $emailIDs = $this->helpers->getEnabledEmailsFromList($listID);

        if (count($emailIDs) == 0) {
            // for some reason, maybe mismatched list_id #'s, finding no emails
            return false;
        }

        // link to the post
        $data['link']  = '<a href="';
        $data['link'] .= $data['canonical_url'];
        $data['link'] .= '">';
        $data['link'] .= $data['title'];
        $data['link'] .= '</a>';

        // iterate through each email address, prepping and sending each email individually!
        foreach ($emailIDs as $emailID) {

            // if emails must be type "primary" AND the email is *not* type primary, do not process
            if (!$this->helpers->isEmailAddressPrimaryType($emailID->email_id)) {
                continue;
            }

            ///////////////////////////////////////////////////////////////////////////////////////////
            ////                         Unsubscribe from List                                     ////
            ///////////////////////////////////////////////////////////////////////////////////////////

            // Create a token
            $unsubscribeToken = $this->createUnsubscribeToken->createUniqueToken();

            // INSERT to the list_unsubscribe_token database table
            $this->createUnsubscribeToken->createTokenRecord($listID, $emailID->email_id, $unsubscribeToken);

            // Build the unsubscribe link
            $data['unsubscribe_link'] = $this->createUnsubscribeToken->unsubscribeURL($unsubscribeToken);

            ///////////////////////////////////////////////////////////////////////////////////////////
            ////                     Send email to a list recipient                                ////
            ///////////////////////////////////////////////////////////////////////////////////////////

            // get the actual email address from the "email_id" field in the "list_email" db table
            $emailData['to_email'] = $this->helpers->getEmailAddressFromEmailID($emailID->email_id);

            // get the person's first name and surname
            $emailData['to_name'] = $this->helpers->getFirstnameSurnameFromEmailID($emailID->email_id);

            $data['to_email'] = $emailData['to_email'] ;
            $data['to_name']  = $emailData['to_name'];

            // send the email one-at-a-time
            // note the queue-ing
            Mail::queue('lasallecrmlistmanagement::emails.send_email_from_list', ['data' => $data], function($message) use ($emailData)
            {
                $message->from(Config::get('lasallecmscontact.from_email'), Config::get('lasallecmscontact.from_name'));
                $message->to($emailData['to_email'], $emailData['to_name']);
                $message->subject($emailData['subject']);
            });
        }

        return true;
    }
1047415
protected function see2Lists($keySingle, $keyPlural, $list1, $list2)
    {
        $sList1 = $this->listToString($list1);
        $sList2 = $this->listToString($list2);
        $key = is_array($list1) && count($list1) > 1 ? $keyPlural : $keySingle;
        return sprintf($this->t($key), $sList1, $sList2);
    }
379061
private function setLeftJoin($table, $field, $parentField, $alias, $parentAlias, $withWhere = false)
    {
        if (!in_array($alias, $this->tables)) {
            $condition = $this->getFullFieldName($field, $alias).' = '.$this->getFullFieldName($parentField, $parentAlias);
            $this->queryBuilder->leftJoin($table, $alias, 'WITH', $condition);
            if ($withWhere) {
                $this->queryBuilder->andWhere($condition);
            }
            $this->tables[] = $alias;
        }
    }
1185694
public function applyFilterMultiSelect(Filter\FilterMultiSelect $filter)
	{
		$this->data_source = $this->data_source->findBy([$this->prepareColumn($filter->getColumn()) => $filter->getValue()]);
	}
50037
public function getLeadsByList($listId, $args = array(), $returnRaw = false)
    {
        $args['listId'] = $listId;

        return $this->getResult('getLeadsByList', $args, false, $returnRaw);
    }
753903
public function setListId($list_id)
    {
        $this->list_id = (is_numeric($list_id)) ? abs(round($list_id)) : NULL;

        return $this;
    }
908184
public function setNamedListTreatment($namedListTreatment)
	{
		switch ((string) $namedListTreatment)
		{
			case Apache_Solr_Service::NAMED_LIST_FLAT:
				$this->_namedListTreatment = Apache_Solr_Service::NAMED_LIST_FLAT;
				break;

			case Apache_Solr_Service::NAMED_LIST_MAP:
				$this->_namedListTreatment = Apache_Solr_Service::NAMED_LIST_MAP;
				break;

			default:
				throw new Apache_Solr_InvalidArgumentException('Not a valid named list treatement option');
		}
	}
794946
public function setTreeData($lft, $rgt, $lvl, $parent = null)
    {
        $this->lft = $lft;
        $this->rgt = $rgt;
        $this->lvl = $lvl;
        $this->parent = $parent;

        return $this;
    }
961802
protected function _prepareExtraOptions(array &$options, $listExtraOptions = [], $optionPrefix = 'data-') {
		if (empty($options) || empty($listExtraOptions)) {
			return;
		}

		if (!is_array($listExtraOptions)) {
			$listExtraOptions = [$listExtraOptions];
		}
		$extraOptions = array_intersect_key($options, array_flip($listExtraOptions));
		if (empty($extraOptions)) {
			return;
		}

		foreach ($extraOptions as $extraOptionName => $extraOptionValue) {
			if (is_bool($extraOptionValue)) {
				if ($extraOptionValue) {
					$extraOptionValue = 'true';
				} else {
					$extraOptionValue = 'false';
				}
			}
			$options[$optionPrefix . $extraOptionName] = $extraOptionValue;
			unset($options[$extraOptionName]);
		}
	}
666220
public function subscribeform($listID) {

        if (!$this->subscribeToList->getListByID($listID)) {
            return view('lasallecrmlistmanagement::subscribe-unsubscribe-list.list_invalid', [
                'title'        => 'Invalid List',
            ]);
        }

        return view('lasallecrmlistmanagement::subscribe-unsubscribe-list.subscribe_form', [
            'title'            => 'List Sign-up',
            'email_field_only' => Config::get('lasallecrmlistmanagement.listmgmt_subscribe_form_email_field_only'),
            'list'             => $this->subscribeToList->getListnameByListId($listID),
            'listID'           => $listID,
        ]);
    }
680714
protected function CreateConditionIn(Selectable $leftHandSide, InList $inList)
    {
        return Condition::In($this->connection, $leftHandSide, $inList);
    }
1054864
public function load_list(array $lst, $flatten_groupings = false)
    {
        foreach ($lst as $basrec) {
            $basrec = explode('_', $basrec);
            if (count($basrec) == 2) {
                try {
                    $record = new record_adapter($this->app, (int) $basrec[0], (int) $basrec[1], $this->get_count());
                } catch (\Exception $e) {
                    continue;
                }
                if ($record->isStory() && $flatten_groupings === true) {
                    foreach ($record->getChildren() as $rec) {
                        $this->add_element($rec);
                    }
                } else {
                    $this->add_element($record);
                }
            }
        }

        return $this;
    }
1086211
public function addItem($listCardItem){
        if($listCardItem instanceof ListCardItem) {

            if(!$this->data['list']) {
                $this->data['list'] = [];
            }

            $this->data['list'][] = $listCardItem->getData();
        }
        return $this;
    }
367572
public function setLocatorData($oCurrArticle, $oLocatorTarget)
    {
        $sLocfnc = "_set{$this->_sType}LocatorData";
        $this->$sLocfnc($oLocatorTarget, $oCurrArticle);

        // passing list type to view
        $oLocatorTarget->setListType($this->_sType);
    }
234882
public static function listToArray($listRaw)
    {
        if (is_array($listRaw)) {
            $list = array_combine(array_values($listRaw), array_values($listRaw));
        } else {
            if (strstr($listRaw, ',')) {
                $list = array_map('trim', explode(',', $listRaw));
            } else {
                $list = [$listRaw];
            }
            $list = array_combine($list, $list);
        }
        return empty($listRaw) ? [] : $list;
    }
880216
private function mergeConfiguration($left, $right)
	{
		if (is_array($left) && is_array($right)) {
			foreach ($left as $key => $val) {
				if (is_int($key)) {
					$right[] = $val;
				} else {
					if (isset($right[$key])) {
						$val = $this->mergeConfiguration($val, $right[$key]);
					}
					$right[$key] = $val;
				}
			}

			return $right;

		} elseif ($left === NULL && is_array($right)) {
			return $right;

		} else {
			return $left;
		}
	}