/** * Add company logo by naming convertion. * * @todo: Move to value callback. */ public function prepareRow($row) { $row->field_company_logo = $row->_unique_id . '.jpg'; if (!file_exists($image_path = $this->getMigrateDirectory() . '/images/' . $row->field_company_logo)) { $this->displayMessage(format_string('Unable to find image: @image', array('@image' => $image_path))); } return parent::prepareRow($row); }
public function __construct($arguments) { parent::__construct($arguments); $this->addFieldMapping(OG_AUDIENCE_FIELD, '_company')->sourceMigration('LuzcCompaniesMigrate'); $this->addFieldMapping('uid', '_author')->sourceMigration('LuzcUsersMigrate'); }