Skip to content

Instantly share code, notes, and snippets.

@mooror
Created December 30, 2016 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mooror/1fc52a7e16cd82fdc9300865544eb468 to your computer and use it in GitHub Desktop.
Save mooror/1fc52a7e16cd82fdc9300865544eb468 to your computer and use it in GitHub Desktop.
<?php
$newItemVersion = StoreItemVersion::create();
$newItemVersion->ParentItemID = $this->newItemId;
$newItemVersion->Name = $composerJsonArray['version'];
$newItemVersion->FileID = 255;
// $newItemVersion->FileID = $newFile;
$newItemVersion->ModeID = 4;
$newItemVersionId = $newItemVersion->write();
//ModeID works fine but FileID dosn't. Instead I get a 0 for FileID in the database
<?php
private static $db = array (
'Name' => 'Varchar',
'FullName' => 'Varchar'
);
private static $has_one = array (
'File' => 'File',
'Mode' => 'StoreItemMode',
'Status' => 'Status'
);
... Truncated ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment