apt-get install pkg-config libmagickwand-dev -y
cd ~/downloads
wget http://pecl.php.net/get/imagick-3.4.0RC2.tgz
tar xvzf imagick-3.4.0RC2.tgz
cd imagick-3.4.0RC2
/opt/sp/php7.0/bin/phpize
./configure
make install
rm -rf /tmp/imagick-3.4.0RC2*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getFieldValues(BaseElementModel $entry, $fields = null) | |
{ | |
foreach ($entry->fieldLayout->fields as $fieldLayoutField) { | |
$fieldHandle = $fieldLayoutField->field->handle; | |
if ($fields === null || in_array($fieldHandle, $fields)) { | |
$field[$fieldHandle] = $entry->getFieldValue($fieldHandle); | |
} | |
} | |
return $field; |