Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 153... Línea 153...
153
     * @param int|null $contextid the platform context instance in which the resource link resides, if available.
153
     * @param int|null $contextid the platform context instance in which the resource link resides, if available.
154
     * @return resource_link the resource_link instance.
154
     * @return resource_link the resource_link instance.
155
     * @throws \coding_exception if the resource_link can't be created.
155
     * @throws \coding_exception if the resource_link can't be created.
156
     */
156
     */
157
    public function add_resource_link(string $resourcelinkid, int $resourceid,
157
    public function add_resource_link(string $resourcelinkid, int $resourceid,
158
            int $contextid = null): resource_link {
158
            ?int $contextid = null): resource_link {
Línea 159... Línea 159...
159
 
159
 
160
        if (!$this->get_id()) {
160
        if (!$this->get_id()) {
161
            throw new \coding_exception('Can\'t add resource_link to a deployment that hasn\'t first been saved');
161
            throw new \coding_exception('Can\'t add resource_link to a deployment that hasn\'t first been saved');
162
        }
162
        }