Skip to content

Instantly share code, notes, and snippets.

@mcantelon
Created November 14, 2012 22:11
Show Gist options
  • Save mcantelon/4075212 to your computer and use it in GitHub Desktop.
Save mcantelon/4075212 to your computer and use it in GitHub Desktop.
1) Use one of the task files as guidance… for example:
lib/task/import/csvAuthorityRecordImportTask.class.php
2) Some code to create a repo:
<?php
$repo = new QubitRepository();
$repo->authorizedFormOfName = 'My Repository';
$repo->identifier = 'myrepo';
$repo->findingAids = 'Find it here';
$repo->save();
You can run a chunk of code like this using (good for trying new things):
./symfony tools:run test.php
These files are the "guts" of Qubit repos:
* lib/model/QubitRepository.php
* lib/model/om/BaseRepository.php
3) Qubit object properties are usually the camel-case equivalent of the DB tables… so the column
"finding_aids" in the repository_i18n MySQL table would be set using the "findingAids" object
property.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment